note 15315 modified in function.checkdnsrr by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 05 Sep 2001 19:33:12 +0000 |
| Subject: | note 15315 modified in function.checkdnsrr by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17682@lists.php.net to get a copy of this message | ||
[Editor's note: Not all email can be mathced w/ your regexp. Also a well-formed email does not
assure the existence of the mailbox. Check the Internet mail RFC for more information (RFC 822), see
also: http://www.imc.org/rfcs.html]
how about preg_match and:
$rex="/^[\w-]+(\.[\w-]+)*@\w+(\.[\w-]{2,3})$/";
if (preg_match ("$rex", "_Kla.3M-er@f.fe_" ))
{
print "valid email";
}
http://www.php.net/manual/en/function.checkdnsrr.php