You are here: Re: email validation (no regex) « PHP « IT news, forums, messages
Re: email validation (no regex)

Posted by Manuel Lemos on 09/21/05 21:43

Hello,

on 09/21/2005 02:49 PM Jim Moseby said the following:
> I threw together this totally untested and unreliable code to solicit
> comments on whether or not this is a good way to validate emails.
Consider
> the following:

> So, what is the general thought about validating email addresses in this
> manner?

This may work but your code has several problems like not handling long
lines, multiline SMTP responses and grey listing. That may cause your
code to break with some SMTP servers or give false negatives.

Instead of re-inventing the wheel, you may want to try this popular
class for validation of e-mail addresses that can check the destination
SMTP server but it handles correctly the problems I mentioned above:

http://www.phpclasses.org/emailvalidation


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация