Skip to content

System.Net.Mail's MailMessage.To property page should explicitly/directly mention it uses commas as delimiters #11232

Open
@Tyler-H

Description

@Tyler-H

Type of issue

Missing information

Description

The System.Net.Mail's MailMessage.To property documentation webpage should explicitly/directly mention it uses commas as delimiters.


The page https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.mailmessage.to does not make any mention of this. You must click through to the linked MailAddressCollection documentation page, and then finally click through again to the MailAddress documentation page and scroll down to the halfway point of the remarks page.

I believe this is a major oversight in the documentation because of how common it is for users to send email this way, and there are no shortage of blog posts and articles online that discuss System.Web.Mail or System.Net.Mail, and don't clearly explain this particular, critical difference between the two. Likewise, there are hundreds if not thousands of questions on Stack Overflow and similar online forums/Q&A sites where users have tried to use a comma where a semicolon was required, or vice versa.

All of those questions and headaches could have possibly been avoided if the System.Net.Mail MailMessage.To page simply mentioned multiple addresses must be delimited with commas.

In contrast with the above, the fact that a semicolon is used as the delimiter for System.Web.Mail is mentioned on its MailMessage.To documentation page in the very first sentence: https://learn.microsoft.com/en-us/dotnet/api/system.web.mail.mailmessage.to

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.mailmessage.to?view=net-9.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net.Mail/MailMessage.xml

Document Version Independent Id

e3505744-34fc-ca35-c9d0-9f7c4c9e34a1

Platform Id

a1fe5f74-c0bc-ddf3-1653-356df964823b

Article author

@karelz

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.NetuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions