1 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

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

Code

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