邮件地址的问题
什么样的邮件地址才是有效的?看了Wikipedia的解释着实让人吓了一跳(留存备考):
Valid email addresses
- niceandsimple@example.com
- very.common@example.com
- a.little.lengthy.but.fine@dept.example.com
- disposable.style.email.with+symbol@example.com
- user@[IPv6:2001:db8:1ff::a0b:dbd0]
- "much.more unusual"@example.com
- "very.unusual.@.unusual.com"@example.com
- "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
- 0@a
- postbox@com (top-level domains are valid hostnames)
- !#$%&'*+-/=?^_`{}|~@example.org
- "()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~ ? ^_`{}|~.a"@example.org
- ""@example.org
Invalid email addresses
- Abc.example.com (an @ character must separate the local and domain parts)
- Abc.@example.com (character dot(.) is last in local part)
- Abc..123@example.com (character dot(.) is double)
- A@b@c@example.com (only one @ is allowed outside quotation marks)
- a"b(c)d,e:f;g<h>i[j\k]l@example.com (none of the special characters in this local part is allowed outside quotation marks)
- just"not"right@example.com (quoted strings must be dot separated, or the only element making up the local-part)
- this is"not\allowed@example.com (spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a backslash)
- this\ still\"not\\allowed@example.com (even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes)
posted on 2012-11-11 11:53 pinocchioatbeijing 阅读(141) 评论(0) 编辑 收藏 举报