/ Published in: PHP
URL: http://snipplr.com/view/69/ckeckmail/
Adapted from http://snipplr.com/view/69/ckeckmail/
Expand |
Embed | Plain Text
// Tests for a valid email address and optionally tests for valid MX records, too. function is_valid_email($email, $test_mx = false) { if($test_mx) { } else return true; else return false; }
Comments
Subscribe to comments
You need to login to post a comment.

--
Instead of :
return getmxrr($domain, $mxrecords);This is better:
return (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A'));nice calvista :)