Net Framework 4.5 MailAddress format and consecutive dots

79 views Asked by At

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?

1

There are 1 answers

0
Rowland Shaw On

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 [email protected] instead of "I.hate.spam."@example.com, as it would show within the message headers.