Announcing a couple of PHP scripts that I think have been a long time in
coming ... 

validateEmail - 2.0
A much needed updating of the validateEmail function created in '98 by Jon
S. Stevens, and updated by Shane Gibson, berber, and Frank Vogel over time.
Several new features have been added, including an improved "wait" routine
for sluggish hosts, and RFC 2821-compliant SMTP command formatting to
eliminate "hang" problems caused by attempts to validate on certain hosts.

I realize there is quite a bit of controversy over the validation methods
used by this script -- therefore, some people may not favor it. However, I
feel it's an effective first line of defense against the "[EMAIL PROTECTED]"
sort of garbage, etc. Those who use validateEmail now will find this to be a
useful upgrade.


validateEmailFormat - 1.0
The PHP online docs say the following in the "add a note" section:

"(And if you're posting an example of validating email addresses, please
don't bother. Your example is almost certainly wrong for some small subset
of cases. See this information from O'Reilly Mastering Regular Expressions
book for the gory details.)"

Good advice, I think. So good, in fact, that I figured it was time someone
just went ahead and translated that regex into PHP. This code is distributed
in accordance with O'Reilly's policy on re-use of code examples from their
books. (http://www.oreilly.com/ask_tim/codepolicy_1101.html)

# # #

I fully recognize that there is no foolproof way to validate an e-mail
address (either its functionality or formatting) without actually sending a
message and requiring the user to respond. In the cases where that tactic is
not considered acceptable, I believe the combination of these two functions
is the next best thing.

validateEmail and validateEmailFormat are freely available at:

    http://www.killersoft.com/contrib/index.html


Comments, suggestions and questions encouraged. Enjoy!

Regards,
-Clay


__________________________________________
Clay Loveless
KillerSoft - http://www.killersoft.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to