关于以下SMTP地址是否符合RFC822,我得到了不同的答案:
"Jane Doe" <jane.doe@acme.com>
上述格式是否兼容,还是应该仅:
jane.doe@acme.com
?
查看了 RFC822 中的以下地址规范:
6. ADDRESS SPECIFICATION
6.1. SYNTAX
address = mailbox ; one addressee
/ group ; named list
group = phrase ":" [#mailbox] ";"
mailbox = addr-spec ; simple address
/ phrase route-addr ; name & addr-spec
route-addr = "<" [route] addr-spec ">"
route = 1#("@" domain) ":" ; path-relative
addr-spec = local-part "@" domain ; global address
local-part = word *("." word) ; uninterpreted
; case-preserved
domain = sub-domain *("." sub-domain)
sub-domain = domain-ref / domain-literal
domain-ref = atom ; symbolic reference
两个电子邮件地址都有效,有关更多电子邮件地址 RFC822 合规性检查,请使用以下工具。
http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate
更新
RFC822 已被RFC2822淘汰以检查RFC2822使用
http://proxy2.de/email-validation.php
编辑
谢谢@jstedfast,上面的链接也验证了RFC5322。