NYCPHP Meetup

NYPHP.org

[nycphp-talk] Validating Email Addresses

Adam Maccabee Trachtenberg adam at trachtenberg.com
Thu Dec 2 13:45:13 EST 2004


On Thu, 2 Dec 2004, Daniel Krook wrote:

> > Joe Bloggs <joe at example.com>
>
> As I understand it, this format which includes the names, brackets and
> whitespace is RFC822 compliant
> [http://www.ietf.org/rfc/rfc0822.txt?number=822] .    If you want it to
> accept the format above, will need an RFC822 compliant parser like the
> Perl module, although your regex seems to work ok for the most common
> format.
>
> I would recommend searching for a reasonable sample of RFC822 compliant
> addresses and run them through, or study examples such as PEAR Mail's
> RFC822.php [http://cvs.php.net/co.php/pear/Mail/Mail/RFC822.php?r=1.18].

Comments (and nested comments) are the real bitch here. I suggest you
pretend they don't exist. :)

-adam

-- 
adam at trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!



More information about the talk mailing list