4 ms·
On the other hand, maybe the specification for email addresses is too loose.
by Tichy 16y ago
On the other hand, maybe the specification for email addresses is too loose.
- arkitaip 16y agoMaybe. I all know is that no one should have to write a regexp like this one http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
- pilif 16y agothe regexp is very impressive, but it's not quite as bad as it would want you to believe. The regexp also matches real names in addresses and lists of addresses. Usually, in forms, you would ask for the real name and for the email address in separate fields and you wouldn't allow lists to be passed in. I do agree though: The email address format is (even without the real name part) too complicated to really validate. In my applications, I check if there's an @-sign (I usually need a proper SMTP email address to deliver anyways), but leave the rest to the mail server on send-time, handling the bounces.
- sigzero 16y agoI believe that misses some edge cases as well.
- petenixey 16y agoToo loose for what though? To make it more useful as a communication format or to make it easier for developers to validate it? It's hard to believe that a tighter spec could have improved the former.
- tomjen3 16y agoWell for starters, why do you need to put comments in your email? That can't be used to make it more useful as a communications format.
- Tichy 16y agoFor one thing it is easier to implement if it is more limited. This should help the client and server developers. Right now email software often seems to be quite complex.