简体   繁体   中英

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. "user names" are, I believe, synonymous with "local part" yet RFC5322 et al state that consecutive dots in the local part are invalid.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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