From 47dc662d8ced06b17b75cc852338aaebd7a94c27 Mon Sep 17 00:00:00 2001 From: pedrobsaila Date: Mon, 11 Nov 2024 13:37:37 +0100 Subject: [PATCH 1/3] MailAddress should not accept email address with consecutive dots --- xml/System.Net.Mail/MailAddress.xml | 408 ++++++++++++++-------------- 1 file changed, 205 insertions(+), 203 deletions(-) diff --git a/xml/System.Net.Mail/MailAddress.xml b/xml/System.Net.Mail/MailAddress.xml index 96afe4c543d..1c232a7e6c6 100644 --- a/xml/System.Net.Mail/MailAddress.xml +++ b/xml/System.Net.Mail/MailAddress.xml @@ -47,75 +47,77 @@ Represents the address of an electronic mail sender or recipient. - class is used by the and classes to store address information for email messages. - -A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them. - + class is used by the and classes to store address information for email messages. + +A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them. + The class supports the following mail address formats: - -- A simple address format of `user@host`. If a is not set, this is the mail address format generated. - -- A standard quoted display name format of `"display name" `. If a is set, this is the format generated. - + +- A simple address format of `user@host`. If a is not set, this is the mail address format generated. + +- A standard quoted display name format of `"display name" `. If a is set, this is the format generated. + - Angle brackets are added around the name and name, if these are not included. For example, `"display name" user@host` is changed to `"display name" `. - + - Quotes are added around the , if these are not included. For example, `display name ` is changed to `"display name" `. - - - Unicode characters are supported in the property. - + + - Unicode characters are supported in the property. + Within these two formats, the following elements are allowed: -- A name with quotes. For example, `"user name"@host`. - -- Consecutive and trailing dots in user names. For example, `user...name..@host`. - -- Bracketed domain literals. For example, ``. - -- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission. - +- A name with quotes. For example, `"user name"@host`. + +- Trailing dot in user names. For example, `username.@host`. + +- Bracketed domain literals. For example, ``. + +- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission. + A comma is used to separate elements in a list of mail addresses. As a result, a comma should not be used in unquoted display names in a list. The following mail addresses would be allowed: - -`"John, Doe" , "Bob, Smith" ` - -The following mail address would not be allowed: - -`John, Doe , Bob, Smith ` - + +`"John, Doe" , "Bob, Smith" ` + +The following mail address would not be allowed: + +`John, Doe , Bob, Smith ` + Quotes can be embedded in a quoted string, but they must be escaped. The following mail addresses would be allowed: - -`"John \"Jr\" Doe" ` - -`"\"John \\\"Jr\\\" Doe\" "` - -The following mail address would not be allowed: - -`"John "Jr" Doe" ` - + +`"John \"Jr\" Doe" ` + +`"\"John \\\"Jr\\\" Doe\" "` + +The following mail address would not be allowed: + +`"John "Jr" Doe" ` + When the username is not quoted, all text between the start of the string (or comma) and the address are considered part of the , including comments. For example: - + `(non comment) unquoted display (non comment) name (non comment) ` - -Although the class accepts a mail address as valid, other mail servers may not accept the mail address. - -The class does not support the following mail address formats: - + +Although the class accepts a mail address as valid, other mail servers may not accept the mail address. + +The class does not support the following mail address formats: + - Mixed quoted and unquoted display names. For example, `display "name" `. - -- Groups, as defined in RFC 2822 Section 3.4 published by the IETF. - + +- 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`. - - - -## Examples -The following code example demonstrates sending an email message by using the , , and classes. - + +- Consecutive dots as specified in RFC 2822 section 3.4.1. For example, `user...name@host` or ``username@ho..st``. + + + +## Examples +The following code example demonstrates sending an email message by using the , , and classes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10"::: -:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: - +:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: + ]]> @@ -173,32 +175,32 @@ The following code example demonstrates sending an email message by using the A that contains an email address. Initializes a new instance of the class using the specified address. - "` - - White space is permitted between the display name and the angle brackets. - - The following table shows the property values for a object constructed using the preceding example address. - -|Property|Value| -|--------------|-----------| -||`"Tom Smith"`| -||`"contoso.com"`| -||`"tsmith"`| -||`"tsmith@contoso.com"`| - - - -## Examples - The following code example uses this constructor to create a object for the recipient of an email message. - + "` + + White space is permitted between the display name and the angle brackets. + + The following table shows the property values for a object constructed using the preceding example address. + +|Property|Value| +|--------------|-----------| +||`"Tom Smith"`| +||`"contoso.com"`| +||`"tsmith"`| +||`"tsmith@contoso.com"`| + + + +## Examples + The following code example uses this constructor to create a object for the recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -262,23 +264,23 @@ The following code example demonstrates sending an email message by using the A that contains the display name associated with . This parameter can be . Initializes a new instance of the class using the specified address and display name. - , `displayName` overrides the value specified in `address`. - - - -## Examples - The following code example uses this constructor to create instances for the sender and recipient of an email message. - + , `displayName` overrides the value specified in `address`. + + + +## Examples + The following code example uses this constructor to create instances for the sender and recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -286,10 +288,10 @@ The following code example demonstrates sending an email message by using the is (""). - is not in a recognized format. - - -or- - + is not in a recognized format. + + -or- + contains non-ASCII characters. @@ -342,45 +344,45 @@ The following code example demonstrates sending an email message by using the The that defines the character set used for . Initializes a new instance of the class using the specified address, display name, and encoding. - , `displayName` overrides the value specified in `address`. - - The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified. - - For more information on supported mail address formats, see . - - - -## Examples - The following code example uses this constructor to create instances for the sender of an email message. - + , `displayName` overrides the value specified in `address`. + + The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified. + + For more information on supported mail address formats, see . + + + +## Examples + The following code example uses this constructor to create instances for the sender of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2"::: + ]]> - is . - - -or- - + is . + + -or- + is . - is (""). - - -or- - + is (""). + + -or- + is (""). - is not in a recognized format. - - -or- - + is not in a recognized format. + + -or- + contains non-ASCII characters. @@ -421,19 +423,19 @@ The following code example demonstrates sending an email message by using the Gets the email address specified when this instance was created. A that contains the email address. - information. - - - -## Examples - The following code example displays the address for an email message recipient. - + information. + + + +## Examples + The following code example displays the address for an email message recipient. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: + ]]> @@ -481,21 +483,21 @@ The following code example demonstrates sending an email message by using the Gets the display name composed from the display name and address information specified when this instance was created. A that contains the display name; otherwise, ("") if no display name information was specified when this instance was created. - method to get the encoded form of the . - - Some software programs that are used to read email display the property value instead of, or in addition to, the email address. - - - -## Examples - The following code example displays the for the recipient of an email message. - + method to get the encoded form of the . + + Some software programs that are used to read email display the property value instead of, or in addition to, the email address. + + + +## Examples + The following code example displays the for the recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -590,11 +592,11 @@ The following code example demonstrates sending an email message by using the Returns a hash value for a mail address. An integer hash value. - method returns a hash code of the mail address. This value can be used as a key in hash tables. - + method returns a hash code of the mail address. This value can be used as a key in hash tables. + ]]> @@ -642,19 +644,19 @@ The following code example demonstrates sending an email message by using the Gets the host portion of the address specified when this instance was created. A that contains the name of the host computer that accepts email for the property. - @@ -697,23 +699,23 @@ The following code example demonstrates sending an email message by using the Returns a string representation of this instance. A that contains the contents of this . - property is not `null` and not equal to (""), returns a string composed using the following syntax: - - \<@> - - If is `null` or is equal to , returns the value of the property. - - - -## Examples - The following code example displays the destination of an email message. - + property is not `null` and not equal to (""), returns a string composed using the following syntax: + + \<@> + + If is `null` or is equal to , returns the value of the property. + + + +## Examples + The following code example displays the destination of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7"::: + ]]> @@ -917,19 +919,19 @@ The following code example demonstrates sending an email message by using the Gets the user information from the address specified when this instance was created. A that contains the user name portion of the . - From dffaec744f4104804e07f3e4e62ec3aa9c950d14 Mon Sep 17 00:00:00 2001 From: pedrobsaila Date: Mon, 11 Nov 2024 13:40:56 +0100 Subject: [PATCH 2/3] Revert "MailAddress should not accept email address with consecutive dots" This reverts commit 47dc662d8ced06b17b75cc852338aaebd7a94c27. --- xml/System.Net.Mail/MailAddress.xml | 408 ++++++++++++++-------------- 1 file changed, 203 insertions(+), 205 deletions(-) diff --git a/xml/System.Net.Mail/MailAddress.xml b/xml/System.Net.Mail/MailAddress.xml index 1c232a7e6c6..96afe4c543d 100644 --- a/xml/System.Net.Mail/MailAddress.xml +++ b/xml/System.Net.Mail/MailAddress.xml @@ -47,77 +47,75 @@ Represents the address of an electronic mail sender or recipient. - class is used by the and classes to store address information for email messages. - -A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them. - + class is used by the and classes to store address information for email messages. + +A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them. + The class supports the following mail address formats: - -- A simple address format of `user@host`. If a is not set, this is the mail address format generated. - -- A standard quoted display name format of `"display name" `. If a is set, this is the format generated. - + +- A simple address format of `user@host`. If a is not set, this is the mail address format generated. + +- A standard quoted display name format of `"display name" `. If a is set, this is the format generated. + - Angle brackets are added around the name and name, if these are not included. For example, `"display name" user@host` is changed to `"display name" `. - + - Quotes are added around the , if these are not included. For example, `display name ` is changed to `"display name" `. - - - Unicode characters are supported in the property. - + + - Unicode characters are supported in the property. + Within these two formats, the following elements are allowed: -- A name with quotes. For example, `"user name"@host`. - -- Trailing dot in user names. For example, `username.@host`. - -- Bracketed domain literals. For example, ``. - -- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission. - +- A name with quotes. For example, `"user name"@host`. + +- Consecutive and trailing dots in user names. For example, `user...name..@host`. + +- Bracketed domain literals. For example, ``. + +- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission. + A comma is used to separate elements in a list of mail addresses. As a result, a comma should not be used in unquoted display names in a list. The following mail addresses would be allowed: - -`"John, Doe" , "Bob, Smith" ` - -The following mail address would not be allowed: - -`John, Doe , Bob, Smith ` - + +`"John, Doe" , "Bob, Smith" ` + +The following mail address would not be allowed: + +`John, Doe , Bob, Smith ` + Quotes can be embedded in a quoted string, but they must be escaped. The following mail addresses would be allowed: - -`"John \"Jr\" Doe" ` - -`"\"John \\\"Jr\\\" Doe\" "` - -The following mail address would not be allowed: - -`"John "Jr" Doe" ` - + +`"John \"Jr\" Doe" ` + +`"\"John \\\"Jr\\\" Doe\" "` + +The following mail address would not be allowed: + +`"John "Jr" Doe" ` + When the username is not quoted, all text between the start of the string (or comma) and the address are considered part of the , including comments. For example: - + `(non comment) unquoted display (non comment) name (non comment) ` - -Although the class accepts a mail address as valid, other mail servers may not accept the mail address. - -The class does not support the following mail address formats: - + +Although the class accepts a mail address as valid, other mail servers may not accept the mail address. + +The class does not support the following mail address formats: + - Mixed quoted and unquoted display names. For example, `display "name" `. - -- Groups, as defined in RFC 2822 Section 3.4 published by the IETF. - + +- 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`. - -- Consecutive dots as specified in RFC 2822 section 3.4.1. For example, `user...name@host` or ``username@ho..st``. - - - -## Examples -The following code example demonstrates sending an email message by using the , , and classes. - + + + +## Examples +The following code example demonstrates sending an email message by using the , , and classes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10"::: -:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: - +:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: + ]]> @@ -175,32 +173,32 @@ The following code example demonstrates sending an email message by using the A that contains an email address. Initializes a new instance of the class using the specified address. - "` - - White space is permitted between the display name and the angle brackets. - - The following table shows the property values for a object constructed using the preceding example address. - -|Property|Value| -|--------------|-----------| -||`"Tom Smith"`| -||`"contoso.com"`| -||`"tsmith"`| -||`"tsmith@contoso.com"`| - - - -## Examples - The following code example uses this constructor to create a object for the recipient of an email message. - + "` + + White space is permitted between the display name and the angle brackets. + + The following table shows the property values for a object constructed using the preceding example address. + +|Property|Value| +|--------------|-----------| +||`"Tom Smith"`| +||`"contoso.com"`| +||`"tsmith"`| +||`"tsmith@contoso.com"`| + + + +## Examples + The following code example uses this constructor to create a object for the recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -264,23 +262,23 @@ The following code example demonstrates sending an email message by using the A that contains the display name associated with . This parameter can be . Initializes a new instance of the class using the specified address and display name. - , `displayName` overrides the value specified in `address`. - - - -## Examples - The following code example uses this constructor to create instances for the sender and recipient of an email message. - + , `displayName` overrides the value specified in `address`. + + + +## Examples + The following code example uses this constructor to create instances for the sender and recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -288,10 +286,10 @@ The following code example demonstrates sending an email message by using the is (""). - is not in a recognized format. - - -or- - + is not in a recognized format. + + -or- + contains non-ASCII characters. @@ -344,45 +342,45 @@ The following code example demonstrates sending an email message by using the The that defines the character set used for . Initializes a new instance of the class using the specified address, display name, and encoding. - , `displayName` overrides the value specified in `address`. - - The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified. - - For more information on supported mail address formats, see . - - - -## Examples - The following code example uses this constructor to create instances for the sender of an email message. - + , `displayName` overrides the value specified in `address`. + + The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified. + + For more information on supported mail address formats, see . + + + +## Examples + The following code example uses this constructor to create instances for the sender of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2"::: + ]]> - is . - - -or- - + is . + + -or- + is . - is (""). - - -or- - + is (""). + + -or- + is (""). - is not in a recognized format. - - -or- - + is not in a recognized format. + + -or- + contains non-ASCII characters. @@ -423,19 +421,19 @@ The following code example demonstrates sending an email message by using the Gets the email address specified when this instance was created. A that contains the email address. - information. - - - -## Examples - The following code example displays the address for an email message recipient. - + information. + + + +## Examples + The following code example displays the address for an email message recipient. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10"::: + ]]> @@ -483,21 +481,21 @@ The following code example demonstrates sending an email message by using the Gets the display name composed from the display name and address information specified when this instance was created. A that contains the display name; otherwise, ("") if no display name information was specified when this instance was created. - method to get the encoded form of the . - - Some software programs that are used to read email display the property value instead of, or in addition to, the email address. - - - -## Examples - The following code example displays the for the recipient of an email message. - + method to get the encoded form of the . + + Some software programs that are used to read email display the property value instead of, or in addition to, the email address. + + + +## Examples + The following code example displays the for the recipient of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9"::: + ]]> @@ -592,11 +590,11 @@ The following code example demonstrates sending an email message by using the Returns a hash value for a mail address. An integer hash value. - method returns a hash code of the mail address. This value can be used as a key in hash tables. - + method returns a hash code of the mail address. This value can be used as a key in hash tables. + ]]> @@ -644,19 +642,19 @@ The following code example demonstrates sending an email message by using the Gets the host portion of the address specified when this instance was created. A that contains the name of the host computer that accepts email for the property. - @@ -699,23 +697,23 @@ The following code example demonstrates sending an email message by using the Returns a string representation of this instance. A that contains the contents of this . - property is not `null` and not equal to (""), returns a string composed using the following syntax: - - \<@> - - If is `null` or is equal to , returns the value of the property. - - - -## Examples - The following code example displays the destination of an email message. - + property is not `null` and not equal to (""), returns a string composed using the following syntax: + + \<@> + + If is `null` or is equal to , returns the value of the property. + + + +## Examples + The following code example displays the destination of an email message. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7"::: - :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7"::: - + :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7"::: + ]]> @@ -919,19 +917,19 @@ The following code example demonstrates sending an email message by using the Gets the user information from the address specified when this instance was created. A that contains the user name portion of the . - From 14ed129d79b7238797331fe455ba5ae39019a6ef Mon Sep 17 00:00:00 2001 From: pedrobsaila Date: Mon, 11 Nov 2024 13:44:47 +0100 Subject: [PATCH 3/3] fix trailing spaces problem --- xml/System.Net.Mail/MailAddress.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xml/System.Net.Mail/MailAddress.xml b/xml/System.Net.Mail/MailAddress.xml index 96afe4c543d..2ea51177181 100644 --- a/xml/System.Net.Mail/MailAddress.xml +++ b/xml/System.Net.Mail/MailAddress.xml @@ -70,7 +70,7 @@ Within these two formats, the following elements are allowed: - A name with quotes. For example, `"user name"@host`. -- Consecutive and trailing dots in user names. For example, `user...name..@host`. +- Trailing dot in user names. For example, `username.@host`. - Bracketed domain literals. For example, ``. @@ -107,6 +107,8 @@ The class does not support the following mail - 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`. + +- Consecutive dots as specified in RFC 2822 section 3.4.1. For example, `user...name@host` or ``username@ho..st``.