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

Michael Stucki mundaun at gmx.ch
Tue Mar 9 10:43:36 CET 2004


Martin T. Kutschker wrote:

>> I suggest that we add a little wrapper which does this job for mails sent
>> by TYPO3.

> Hm?? You mean a lttle code that translates umlauts in iso-8859-1, utf.8,
> etc in the IDN encoding?

It just translates the domain name part of an address:

$mailaddress = müller at müllermilch.de;
$mailaddress = convertToIDN($mailaddress);
echo $mailaddress;

This wrapper would return 'müller at xn--mller-kva.de' in our case.

Unfortunately this translation looks to be a difficult thing! There's a
class in the PHPclasses repository that does the conversion but it's not
licensed as GPL. Don't know if this could ever be included:
http://www.phpclasses.org/browse/package/1509.html

Maybe it's better to wait until PHP adds native support for all kinds of IDN
operations.

>> Don't forget that umlauts in the localpart of an address have ever been
>> valid!

> I though you'd had to quote them to be valid: "müller"@miclh.de. Or was
> it escaping?

I'm not sure, but I think this is not needed. Does anybody know?

- michael
-- 
Want support? Please read the list rules first: http://typo3.org/1438.0.html




More information about the TYPO3-dev mailing list