[Typo3-dev] Improvement of function validEmail($email)
Martin T. Kutschker
Martin.T.Kutschker at blackbox.net
Mon Mar 8 17:51:57 CET 2004
Stefan Geith wrote:
> Hi,
>
> 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 ?
On php.net it says checkdnsrr() ist not available on Windows.
And for getmxrr() it says you shouldn't use this function to verify an
address, because if no MX record exists then you should use the domain
itself.
But even if you change the code I'm not sure if this is a good idea.
Checking against DNS is fine, but I have a bad feeling for adding this
in this function. The calling code might not expect delays introduced by
your changes.
Perhaps an additional argument or another function may be approriate.
Masi
PS: I had submitted an IMHO improved version of the regexp, which seems
to be lost on the now defunct Mantis bugtracker on the netfielders.de
server.
More information about the TYPO3-dev
mailing list