1 common.inc valid_email_address($mail)

Verifies the syntax of the given email address.

See RFC 5321 for details.

Parameters

$mail: A string containing an email address.

Return value

TRUE if the address is in a valid format.:

Related topics

File

core/includes/common.inc, line 1454
Common functions that many Backdrop modules will need to reference.

Code

function valid_email_address($mail) {
  return (bool) filter_var($mail, FILTER_VALIDATE_EMAIL);
}