[dev] Re: [cvs] commit: horde/lib Form.php

Michael J. Pawlowsky mikejp at videotron.ca
Tue Feb 4 11:39:22 PST 2003



None taken...   I never said it is bullet proof. But beats simply checking for a "@" sign.

Also checking the DNS reduces the need to make sure every possible combination is in the code.
If the mail server is online, we know that much is ok.
I used to use VRFY for quite a while. But the last 4-5 years I dropped it because so many servers refuse VRFY now.

I suppose you could also simply connect do a MAIL TO and see if the server accepts it.

Mike



*********** REPLY SEPARATOR  ***********

On 04/02/2003 at 11:07 AM Chuck Hagenbuch wrote:

>Quoting "Michael J. Pawlowsky" <mikejp at videotron.ca>:
>
>> 		if((preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) ||
>>
>(preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',
>> $email)))
>
>No offense, but I kinda doubt that correctly accepts/rejects email
>addresses. The best official regex for it is several pages long.
>
>-chuck
>
>--
>Charles Hagenbuch, <chuck at horde.org>
>must ... find ... acorns ... *thud*
>
>--
>Horde developers mailing list
>Frequently Asked Questions: http://horde.org/faq/
>To unsubscribe, mail: dev-unsubscribe at lists.horde.org


Cheers,
Mike
---------------------------------------------------------------------------------------------------------
Hlade's Law:	If you have a difficult task, give it to a lazy person --
		they will find an easier way to do it.





More information about the dev mailing list