note 5507 deleted from function.mail by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 23:00:44 +0000 |
| Subject: | note 5507 deleted from function.mail by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19855@lists.php.net to get a copy of this message | ||
This validation code fixes the problem with not being able to recognize long MX records such as
someone@ab.cd.ef.gh
<tt>// validate e-mail address
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2}[mtgvu]?$",
$email, $check)) {
if ( getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp) ) $email_valid = 1;
}</tt>