[Typo3-dev] Improvement of function validEmail($email)

Dominic Brander typo3_db at snowflake.ch
Mon Mar 8 18:17:08 CET 2004


hi
if you are working on an improved email validation please do remember 
that in the nearest future mails like müller at müllermilch.de will be 
possible... and don't forget about all the other possibilities...

have fun with that ;-)

cheers

dominic

Wolfgang Klinger wrote:

>  Hi
> On 17:31 Mon 08 Mar     , Stefan Geith wrote:
> 
>>I had the idea to check for an existing MX-Record in DNS,
>>when validating an email-address. So only email-addresses
>>with a valid domainname would be ok.  Good idea ?
> 
> 
>  Good idea ;-)
> 
>  I already sent some improvements for this function to Kasper:
> 
> ---
> function validEmail($email) {                                                                                                                                                
>     $email = trim ($email); 
>     if (strstr($email,' '))  return FALSE;
>     return
>     ereg('^[A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]*[\.].[A-Za-z0-9]+$',$email)
>     ? true : false;
> }     
> ---
> 
>  Addresses with ip and port are valid but not for the above function
>  ,-(
>  
>  RFC: http://www.ietf.org/rfc/rfc0822.txt?number=822
> 
>  This is the ultimate e-mail validation regular expression:
> 
>  http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
> 
>  *hehe*
> 
>  bye
>  Wolfgang
>  
> 
> 
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 

-- 
dominic
________________________________________________________________________
dominic brander - snowflake productions gmbh
http://www.snowflake.ch






More information about the TYPO3-dev mailing list