![]() ![]() Not only that, but it’s also valid (though not recommended and very uncommon) to have quoted local parts which allow pretty much anyĬharacter. ![]() An atom is defined in section 3.2.4 as a series of alphanumeric characters and may include the followingĬharacters ( all the ones you need to swear in a comic strip)… The locally interpreted string isĪ dot-atom is a dot delimited series of atoms. Interpreted string followed by the at-sign character ASCII valueĦ4) followed by an Internet domain. Section section 3.4.1 of RFC 2822 goes into more detail about the specification of an email address (emphasis mine).Īn addr-spec is a specific Internet identifier that contains a locally Specified in the domain part of the address. Local-part MUST be interpreted and assigned semantics only by the host Hosts have attempted to optimize transport by modifying them, the According to section 2.3.10 of RFC 2821 which defines SMTP, the part before the sign is called the local part (the part after being the host domain) and it is only intended to be interpreted by the receiving host…Ĭonsequently, and due to a long history of problems when intermediate It turns out that the local part of an email address, the part before the sign, allows a lot more characters than you’d expect. Nearly 100% of regular expressions on the web purporting to validate an email address are too strict. I simply based my implementation on my preconceived assumptions about what makes a valid email address. I had never actually read (or even skimmed) the RFC for an email address. This time, for some reason, I decided to take a look at my underlying assumptions. ![]() Something I’ve done a hundred thousand times (seriously, I counted) using a handy dandy regular expression in my personal library. I needed to validate an email address on the server. I was speaking metaphorically.īefore yesterday I would have raised my hand (metaphorically) as well. It’s an odd sight to see someone sitting alone at the keyboard raising his or her hand. For those of you with your hand in the air, put it down quickly before someone sees you. Raise your hand if you know how to validate an email address. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |