1.20.x common.inc | valid_email_address($mail) |
Verifies the syntax of the given e-mail address.
See RFC 5321 for details.
Parameters
$mail: A string containing an e-mail address.
Return value
TRUE if the address is in a valid format.:
Related topics
File
- includes/
common.inc, line 1409 - Common functions that many Backdrop modules will need to reference.
Code
function valid_email_address($mail) {
return (bool) filter_var($mail, FILTER_VALIDATE_EMAIL);
}