note 8178 added to mail
| From: | post at jfl dot dk | Date: | Wed, 30 Aug 2000 09:04:36 +0000 |
| Subject: | note 8178 added to mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3651@lists.php.net to get a copy of this message | ||
Here's my way to check if an E-mail address is valid:
function checkmail_mx ($email) {
if (eregi("^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$)", $email, $check)) {
if (getmxrr($check[1].".".$check[2], $temp)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
// www.eksperten.dk
http://www.php.net/manual/function.mail.php