<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://php.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>PHP Zone - Comments for &quot;PHP Email Validator - Email MX DNS Record Check&quot;</title>
 <link>http://php.dzone.com/news/php-email-validator-email-mx-d</link>
 <description>Comments for &quot;PHP Email Validator - Email MX DNS Record Check&quot;</description>
 <language>en</language>
<item>
 <title>I prefer using</title>
 <link>http://php.dzone.com/news/php-email-validator-email-mx-d#comment-2943</link>
 <description>&lt;!--paging_filter--&gt;I prefer using filter_var($var, FILTER_VALIDATE_EMAIL). And, by the way, your regular expression is not correct. E.g. &#039;+&#039; sign can be used in the email address.</description>
 <pubDate>Wed, 30 Apr 2008 06:05:35 -0400</pubDate>
 <dc:creator>gedrox</dc:creator>
 <guid isPermaLink="false">comment 2943 at http://php.dzone.com</guid>
</item>
<item>
 <title>Good points Loïc.  The</title>
 <link>http://php.dzone.com/news/php-email-validator-email-mx-d#comment-1679</link>
 <description>&lt;!--paging_filter--&gt;Good points Loïc.  The confirmation email is always best, but this functionality could be used to BEFORE the confirmation stage to prevent bad email addresses.</description>
 <pubDate>Thu, 06 Mar 2008 22:13:25 -0500</pubDate>
 <dc:creator>davidwalsh</dc:creator>
 <guid isPermaLink="false">comment 1679 at http://php.dzone.com</guid>
</item>
<item>
 <title>Yeah well that&#039;s what the</title>
 <link>http://php.dzone.com/news/php-email-validator-email-mx-d#comment-1678</link>
 <description>&lt;!--paging_filter--&gt;Yeah well that&#039;s what the PHP documentation already say.&lt;br /&gt;
&lt;br /&gt;
What I wonder is whether you&#039;ll find some real address not allowed by this, as said in &lt;a href=&quot;http://fr2.php.net/manual/en/function.checkdnsrr.php#75452&quot;&gt;this comment in the documentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
And well, you check a domain, not the whole email address, so the local part can simply be garbage, it could even contain control characters if you only use this function. It also can&#039;t really tell that the address is real. After all you could enter whatever@hotmail.com and be good.&lt;br /&gt;
&lt;br /&gt;
In my opinion, the best way to validate an email address is to send a confirmation email, and to filter trash mail domains like trash-mail.de and friends. I would use both regex and domain validation as an indication to the user to prevent him from making a mistake while entering his email address. But not preventing him for submitting it if he&#039;s sure it&#039;s good. After all, if his email address is really correct, you might lose a customer.&lt;br /&gt;
&lt;br /&gt;
Finally, checkdnssrr is not available on Windows. Take that in consideration if your application needs to be portable.</description>
 <pubDate>Thu, 06 Mar 2008 21:49:18 -0500</pubDate>
 <dc:creator>lhoguin</dc:creator>
 <guid isPermaLink="false">comment 1678 at http://php.dzone.com</guid>
</item>
</channel>
</rss>
