<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Check for a valid e-mail address</title>
	<link>http://phpit.net/code/valid-email/</link>
	<description>PHPit has dozens of PHP articles, codesnippets and FAQ's.</description>
	<pubDate>Mon, 21 Apr 2008 11:25:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: Rick Stockton</title>
		<link>http://phpit.net/code/valid-email/#comment-8538</link>
		<pubDate>Sun, 23 Jul 2006 06:01:52 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-8538</guid>
					<description>Wow, your dang "stripper" just trashed key parts of my post where I mentioned the "Less-Than" character. In my example, my name "Rick Stockton" was followed by a spare space, then a Less-Than, then a Traditional Email Address of rick-atsign-mycompany-dot-com, and finally the Greater-Than character.

My last sentence was saying that if the submitted address to test end with a Greater-Than, then (a) we require that ONE Less-Than character exist somewhere earlier in the string; and (b) if it does, then we extract and test just the substring between the Less-Than character and the terminating Greater-Than.</description>
		<content:encoded><![CDATA[<p>Wow, your dang &#8220;stripper&#8221; just trashed key parts of my post where I mentioned the &#8220;Less-Than&#8221; character. In my example, my name &#8220;Rick Stockton&#8221; was followed by a spare space, then a Less-Than, then a Traditional Email Address of rick-atsign-mycompany-dot-com, and finally the Greater-Than character.</p>
<p>My last sentence was saying that if the submitted address to test end with a Greater-Than, then (a) we require that ONE Less-Than character exist somewhere earlier in the string; and (b) if it does, then we extract and test just the substring between the Less-Than character and the terminating Greater-Than.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Rick Stockton</title>
		<link>http://phpit.net/code/valid-email/#comment-8537</link>
		<pubDate>Sun, 23 Jul 2006 05:51:26 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-8537</guid>
					<description>Padraic's Partholan page is now 404.

There's a pretty basic failure in the original code posted here on May 2, 2006: Per the RFC (2822, Section 3.4) an address or  person's "display-name" can precede the traditional addr-spec which this code tests, as long as the addr-spec is then enclosed in Greater-Than Less-Than signs thus:  

""

We've all seen it a million times, an address such as this one:
Rick Stockton 

It fails your function. In the case of such as email, we need to test only the portion between "".

I can't program worth sh#^. But, I think the thing to do is check for "&#62;" as the last char, and if it exists then (a) require that "</description>
		<content:encoded><![CDATA[<p>Padraic&#8217;s Partholan page is now 404.</p>
<p>There&#8217;s a pretty basic failure in the original code posted here on May 2, 2006: Per the RFC (2822, Section 3.4) an address or  person&#8217;s &#8220;display-name&#8221; can precede the traditional addr-spec which this code tests, as long as the addr-spec is then enclosed in Greater-Than Less-Than signs thus:  </p>
<p>&#8220;&#8221;</p>
<p>We&#8217;ve all seen it a million times, an address such as this one:<br />
Rick Stockton </p>
<p>It fails your function. In the case of such as email, we need to test only the portion between &#8220;&#8221;.</p>
<p>I can&#8217;t program worth sh#^. But, I think the thing to do is check for &#8220;&gt;&#8221; as the last char, and if it exists then (a) require that &#8220;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Pádraic</title>
		<link>http://phpit.net/code/valid-email/#comment-5650</link>
		<pubDate>Mon, 26 Jun 2006 08:58:43 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-5650</guid>
					<description>Another take which follows the RFC for email formats...
http://svn.sourceforge.net/viewcvs.cgi/quantumstar/trunk/Partholan/Parth_EmailFormatValidator.php?view=markup</description>
		<content:encoded><![CDATA[<p>Another take which follows the RFC for email formats&#8230;<br />
<a href='http://svn.sourceforge.net/viewcvs.cgi/quantumstar/trunk/Partholan/Parth_EmailFormatValidator.php?view=markup' rel='nofollow'>http://svn.sourceforge.net/viewcvs.cgi/quantumstar/trunk/Partholan/Parth_EmailFormatValidator.php?view=markup</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: sdfsf</title>
		<link>http://phpit.net/code/valid-email/#comment-3116</link>
		<pubDate>Sun, 04 Jun 2006 22:01:45 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-3116</guid>
					<description>[?([0-9]{1,3}\.){3}[0-9]{1,3}\]?$”, $email_array[1])) {
if (!ereg(”^([A-Za-z0-9][A-Za</description>
		<content:encoded><![CDATA[<p>[?([0-9]{1,3}\.){3}[0-9]{1,3}\]?$”, $email_array[1])) {<br />
if (!ereg(”^([A-Za-z0-9][A-Za
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: TheUndefined</title>
		<link>http://phpit.net/code/valid-email/#comment-3023</link>
		<pubDate>Fri, 02 Jun 2006 08:39:22 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-3023</guid>
					<description>I've made some changes to the domain check part that i found usefull
now the IP has to 4 of the xx.xxx.x.xxx kind of form

if (!ereg("^\[?([0-9]{1,3}\.){3}[0-9]{1,3}\]?$", $email_array[1])) {
if (!ereg("^([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]\.)+([A-Za-z]{2,4}&#124;museum&#124;travel)$", $email_array[1])) {
				return false;
		}
		// TODO:  the domain part is syntacticly valid, now do the reverse DNS
		// full domain in $email_array[1]
	}</description>
		<content:encoded><![CDATA[<p>I&#8217;ve made some changes to the domain check part that i found usefull<br />
now the IP has to 4 of the xx.xxx.x.xxx kind of form</p>
<p>if (!ereg(&#8221;^\[?([0-9]{1,3}\.){3}[0-9]{1,3}\]?$&#8221;, $email_array[1])) {<br />
if (!ereg(&#8221;^([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]\.)+([A-Za-z]{2,4}|museum|travel)$&#8221;, $email_array[1])) {<br />
				return false;<br />
		}<br />
		// TODO:  the domain part is syntacticly valid, now do the reverse DNS<br />
		// full domain in $email_array[1]<br />
	}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: taaniel</title>
		<link>http://phpit.net/code/valid-email/#comment-2905</link>
		<pubDate>Tue, 30 May 2006 10:14:26 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-2905</guid>
					<description>Hi,

i think "ds@23.2312" is not valid email address but valid_email('ds@23.2312') returns TRUE

With best wishes,
Taaniel</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i think &#8220;ds@23.2312&#8243; is not valid email address but valid_email(&#8217;ds@23.2312&#8242;) returns TRUE</p>
<p>With best wishes,<br />
Taaniel
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: lavercq</title>
		<link>http://phpit.net/code/valid-email/#comment-1683</link>
		<pubDate>Fri, 12 May 2006 14:15:18 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-1683</guid>
					<description>I woulb be sure that any malicious spammeur can't use my email address on my web site...
is your script secured sufficiently to forbid this use ?
Thank's a lot.</description>
		<content:encoded><![CDATA[<p>I woulb be sure that any malicious spammeur can&#8217;t use my email address on my web site&#8230;<br />
is your script secured sufficiently to forbid this use ?<br />
Thank&#8217;s a lot.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: PHPit - Totally PHP &#187; PHP Security: Basic PHP Security</title>
		<link>http://phpit.net/code/valid-email/#comment-1491</link>
		<pubDate>Tue, 02 May 2006 09:43:36 +0000</pubDate>
		<guid>http://phpit.net/code/valid-email/#comment-1491</guid>
					<description>[...] The possibility to inject any dangerous data into our script has already been greatly diminished, by checking the data. The valid_email() function is a standard validation function, which can be found in the PHPit Code Snippet Database. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] The possibility to inject any dangerous data into our script has already been greatly diminished, by checking the data. The valid_email() function is a standard validation function, which can be found in the PHPit Code Snippet Database. [&#8230;]
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
