Posted by Michael Fesser on 02/28/07 23:19
..oO(petersprc)
>Here's one function to check an email address:
>
> http://www.ilovejackdaniels.com/php/email-address-validation/
I still doubt that this will match all valid addresses. The RFC is way
too complex to be handled with a simple regular expression. Compare the
address from the site above with this one:
http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
I would just check that there's an "@" char with something before it,
something after it and no line breaks. That's it. Just because a mail
address looks valid doesn't mean that it really exists, so why bother?
Just send out a mail and either it will reach its destination or not.
Micha
[Back to original message]
|