Skip to content

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

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

Open
Tyler-H opened this issue Apr 23, 2025 · 1 comment
Labels
area-System.Net untriaged New issue has not been triaged by the area owner

Comments

@Tyler-H
Copy link

Tyler-H commented Apr 23, 2025

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 23, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant