-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update ns-System.Net.Mail.xml #2420
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
Conversation
Lift the warning from SmtpClient to the namespace to make it clearer this is now obsolete.
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.
Thanks for submitting this PR, @stephenegriffin. I don't think, though, that adding an IMPORTANT note really calls attention to the fact that SmtpClient is deprecated. I've suggested an alternative.
xml/ns-System.Net.Mail.xml
Outdated
|
||
|
||
[!IMPORTANT] | ||
We don't recommend that you use the `SmtpClient` class for new development. For more information, see [SmtpClient shouldn't be used](https://github.com/dotnet/platform-compat/blob/master/docs/DE0005.md) on GitHub. |
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.
The formatting here is incorrect to produce a note box. The lines should be preceded by >
. But this seems an awkward way of handling the fact that SmtpClient is obsolete in any case. Instead of the note, I'd modify the Remarks section as I've suggested, and also add "(This type is now obsolete.)" to the type summary in dotnet-api-docs/xml/System.Net.Mail/SmtpClient.xml.
xml/ns-System.Net.Mail.xml
Outdated
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0"> | ||
<AttributeName>System.Obsolete("SmtpClient and its network of types are poorly designed, we strongly recommend you use https://github.com/jstedfast/MailKit and https://github.com/jstedfast/MimeKit instead")</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
<Docs> | ||
<summary>The <see cref="N:System.Net.Mail" /> namespace contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery.</summary> | ||
<remarks> | ||
<format type="text/markdown"><![CDATA[ | ||
|
||
## Remarks | ||
The <xref:System.Net.Mail.MailMessage> class represents the content of a mail message. The <xref:System.Net.Mail.SmtpClient> class transmits email to the SMTP host that you designate for mail delivery. You can create mail attachments using the <xref:System.Net.Mail.Attachment> class. |
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.
The <xref:System.Net.Mail.MailMessage> class represents the content of a mail message. The <xref:System.Net.Mail.SmtpClient> class transmits email to the SMTP host that you designate for mail delivery. You can create mail attachments using the <xref:System.Net.Mail.Attachment> class. | |
The <xref:System.Net.Mail.MailMessage> class represents the content of a mail message. | |
You can create mail attachments using the <xref:System.Net.Mail.Attachment> class. |
Since you didn't respond, @stephenegriffin, I've incorporated my suggestions into your PR, and also opened #2483 to change the description of SmtpClient. I'll merge your PR now. |
Sorry - missed your reply - thanks for following through on this. |
Actually - this is all wrong - the point was to indicate that the entire System.Net.Mail namespace is deprecated. You've removed that and added a redundant note to SmtpClient. |
Lift the warning from SmtpClient to the namespace to make it clearer this is now obsolete.
Summary
Describe your changes here.
Fixes #Issue_Number (if available)