Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On the other hand, maybe the specification for email addresses is too loose.


Too 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.


Well 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.


I'm afraid I don't understand your question


Then you are unfamiliar with email address formats, which have a specific formatting that allows for "comments", and it is kind of hairy.


For 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.


Maybe. 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


the 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.


I believe that misses some edge cases as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: