Function validateEmail
Provides a simple email address validation.
string validateEmail
(
string str,
size_t max_length = 64
);
bool validateEmail(R)
(
ref R error_sink,
string str,
size_t max_length = 64
)
if (isOutputRange!(R, char));
Note that the validation could be stricter in some cases than required. The user name is forced to be ASCII, which is not strictly required as of RFC 6531. It also does not allow quotiations for the user name part (RFC 5321).
Invalid email adresses will cause an exception with the error description to be thrown.