E-mail Validation with PHP by Douglas Lovell

If you’re looking for a great e-mail function for PHP, check out Douglas Lovell’s post on Linux Journal. It’s one of the best solutions to a deceptively difficult problem that every PHP developer has to solve sooner or later.

While no e-mail validation function is perfect, too often developers tend to go with a preg_match one-liner. These solutions tend to be too simplistic, Lovell’s approach is quite thorough and well explained in his story “Validate an E-Mail Address with PHP, the Right Way.”

Give it a look and tweak it for your needs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.