Does not handle comments (No biggie but stumbled upon this)
Xor-el opened this issue · comments
john.smith(comment)@example.com
or
(comment)john.smith@example.com
Both are same as john.smith@example.com
SMTP doesn't handle comments either in the MAIL FROM or RCPT TO commands.
There are 2 different email address specifications: SMTP and Internet Message Format.
Most people (including wikipedia) confuse the two and think they are the same, but they are not.
Comments may only appear in the From/To/Cc/etc headers of an Internet Message, but may not appear in the addresses used with SMTP.
Email Address Validation is for what? It's not for parsing emails used in a raw Internet Message document. They are for validating user-input in a text field because they will be used with SMTP.
Correct?
Then it stands to reason that an EmailValidator needs to conform to the SMTP specification and not the Internet Message Format specification.
So there's no need to handle comments (because, let's be honest, what user is going to write comments in their email address on a web form? or anywhere else for that matter?)
If you want comments to be handled, use MimeKit - that's why I wrote that library :)
thanks for your splendid explanation.
Regards.
No prob :)