I use the Zend_Validate_EmailAddress to validate email addresses for my email program. It validates according to the RFC2822 - http://framework.zend.com/manual/en/zend.validate.set.html
My question is are these valid emails when they pass validation?
[email protected]. [email protected]. etc Note the full stop at the end.
I find that the validator passes these email addresses which are obviously wrong. I don't fully understand why this should pass can anyone help me?
Regards
The email addresses are not "obviously wrong"; a DNS name is allowed to end with a trailing .
to indicate that it's absolute rather than relative.
[EDITED to add: The above may be misleading. In an email address, for SMTP at least, hostnames are always interpreted as fully-qualified -- i.e., "absolute". So there's never a need for a trailing .
in the hostname part of an email address. However, the trailing .
is still valid hostname syntax.]