valid_email_address

5 common.inc valid_email_address($mail)
6 common.inc valid_email_address($mail)
7 common.inc valid_email_address($mail)
8 common.inc valid_email_address($mail)

Verifies the syntax of the given e-mail address.

Empty e-mail addresses are allowed. See RFC 2822 for details.

Parameters

$mail: A string containing an e-mail address.

Return value

TRUE if the address is in a valid format.

Related topics

4 calls to valid_email_address()

File

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

Code

function valid_email_address($mail) {
  return (bool) filter_var($mail, FILTER_VALIDATE_EMAIL);
}
Login or register to post comments