dotnet / dotnet/dotnet-api-docs

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

Open
#11,232 1 comment 0 reactions 0 assignees View on GitHub
area-System.Net untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.