Re: testing an email address
| From: | Jason G. | Date: | Sat, 13 Oct 2001 04:27:44 +0000 |
| Subject: | Re: testing an email address | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70959@lists.php.net to get a copy of this message | ||
Here, This not only checks the form of an email address, but if the domain is valid!
//This function checks the validity of an email, and if the domain is registered!
//If the second parameter is true, then it does NOT check for a valid domain name.
function check_email($email, $bJustFormat = FALSE)
{
if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $email, $check))
if ($bJustFormat || getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp))
return TRUE;
return FALSE;
}
At 11:06 AM 10/12/2001 -0500, Joseph Bannon wrote:
Is there a PHP function to test whether an email address is valid or not? Thanks, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net