-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update consecutive dots remarks #12187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @dotnet/ncl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the documentation for the MailAddress class to clarify that consecutive dots in user names are only allowed in .NET 9 and earlier, and are no longer permitted starting in .NET 10. The changes also include general formatting improvements and modernization of the documentation style.
- Moves the consecutive dots remark from the allowed elements section to both the allowed and unsupported sections with version-specific notes
- Updates property references from older
%2Aformat to cleaner inline link format - Removes redundant "## Remarks" and "## Examples" headers, improves whitespace and formatting consistency
| `(non comment) unquoted display (non comment) name (non comment) <user@host>` | ||
| Although the <xref:System.Net.Mail.MailAddress> class accepts a mail address as valid, other mail servers may not accept the mail address. | ||
| Although the <xref:System.Net.Mail.MailAddress> class accepts a mail address as valid, other mail servers might not accept the mail address. |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the custom coding guidelines, use "might" instead of "may" to indicate possibility.
| - Mixed quoted and unquoted display names. For example, `display "name" <user@host>`. | ||
| - Groups, as defined in RFC 2822 Section 3.4 published by the IETF. | ||
| - The obsolete user name formats of `"user"."name"@host`, `user."name"@host` or `"user".name@host`. | ||
| - .NET 10 and later versions only: Consecutive dots in the user name, for example, `user...name@host.com`. |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a period at the end of this list item to comply with the custom coding guideline that code comments should end with a period.
xml/System.Net.Mail/MailAddress.xml
Outdated
| For more information on supported mail address formats, see <xref:System.Net.Mail.MailAddress>. | ||
| If `address` contains a display name, and `displayName` is not `null` and is not equal to <xref:System.String.Empty?displayProperty=nameWithType>, `displayName` overrides the value specified in `address`. | ||
| The <xref:System.Net.Mail.MailAddress.%23ctor> method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the <xref:System.Net.Mail.MailAddress.DisplayName> property. Quotes will be added before transmission, except where <xref:System.Text.Encoding.ASCII> or <xref:System.Text.Encoding.Unicode> is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the <xref:System.Net.Mail.MailAddress.DisplayName> property before transmission <xref:System.Text.Encoding.ASCII> or <xref:System.Text.Encoding.Unicode> is specified in the `displayNameEncoding` parameter. <xref:System.Text.Encoding.UTF8> is the default encoding if none is specified. |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is overly long and complex. Consider breaking it into multiple sentences to improve readability and follow the guideline to break up long sentences.
| The <xref:System.Net.Mail.MailAddress> class is used by the <xref:System.Net.Mail.SmtpClient> and <xref:System.Net.Mail.MailMessage> classes to store address information for email messages. | ||
| A mail address is composed of a <xref:System.Net.Mail.MailAddress.User%2A> name, <xref:System.Net.Mail.MailAddress.Host%2A> name and optionally, a <xref:System.Net.Mail.MailAddress.DisplayName%2A>. The <xref:System.Net.Mail.MailAddress.DisplayName%2A> can contain non-ASCII characters if you encode them. | ||
| A mail address is composed of a [user name](xref:System.Net.Mail.MailAddress.User), [host name](xref:System.Net.Mail.MailAddress.Host) and optionally, a [display name](xref:System.Net.Mail.MailAddress.DisplayName). <xref:System.Net.Mail.MailAddress.DisplayName> can contain non-ASCII characters if you encode them. |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "The" at the start of the sentence to match the style of the previous sentence and maintain consistency.
| A mail address is composed of a [user name](xref:System.Net.Mail.MailAddress.User), [host name](xref:System.Net.Mail.MailAddress.Host) and optionally, a [display name](xref:System.Net.Mail.MailAddress.DisplayName). <xref:System.Net.Mail.MailAddress.DisplayName> can contain non-ASCII characters if you encode them. | |
| The mail address is composed of a [user name](xref:System.Net.Mail.MailAddress.User), [host name](xref:System.Net.Mail.MailAddress.Host), and an optional [display name](xref:System.Net.Mail.MailAddress.DisplayName). <xref:System.Net.Mail.MailAddress.DisplayName> can contain non-ASCII characters if you encode them. |
Contributes to dotnet/docs#50592.
Also does other cleanup in the file. (So hide whitespace changes.)