简体   繁体   English

Net Framework 4.5 MailAddress格式和连续的点

[英]Net Framework 4.5 MailAddress format and consecutive dots

The Net Framework 4.5 MailAddress class supports the following mail address formats: blah, blah "Consecutive and trailing dots in user names" blah, blah. Net Framework 4.5 MailAddress类支持以下邮件地址格式:等等,“用户名中的连续点和结尾点”等等,等等。 "user names" are, I believe, synonymous with "local part" yet RFC5322 et al state that consecutive dots in the local part are invalid. 我相信“用户名”是“本地部分”的同义词,但RFC5322等指出本地部分中的连续点是无效的。

What's going on here, please? 请问这是怎么回事?

RFC5322 allows for the local-part to be either a dot-atom, quoted-string or a obs-local-part. RFC5322允许本地部分为点原子,带引号的字符串或obs-local-part。 Specifically looking at the quoted-string option there, that can contain in its content any ASCII characters apart from the quote character or the "\\" character; 专门查看那里的quoted-string选项,该内容中可以包含除引号字符或“ \\”字符之外的任何ASCII字符; and as such, you could have multiple dots in the user portion of an email address within an email message. 这样,您在电子邮件中的电子邮件地址的用户部分中可能会有多个点。 Of course, an application may choose to display I.hate.spam.@example.com instead of "I.hate.spam."@example.com , as it would show within the message headers. 当然,应用程序可以选择显示I.hate.spam.@example.com而不是“ "I.hate.spam."@example.com I.hate.spam.@example.com ,因为它会显示在消息标题中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM