Skip to content

Commit 648d5e5

Browse files
authored
Temporarily remove obsolete attribute (#3320)
* Temporarily remove obsolete attribute * feedback * expand note * fix typo + improvements
1 parent cc4a3d4 commit 648d5e5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

xml/System.Net.Mail/SmtpClient.xml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,25 @@
2929
<InterfaceName>System.IDisposable</InterfaceName>
3030
</Interface>
3131
</Interfaces>
32-
<Attributes>
33-
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
34-
<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>
35-
</Attribute>
36-
</Attributes>
3732
<Docs>
3833
<summary>Allows applications to send email by using the Simple Mail Transfer Protocol (SMTP). The <c>SmtpClient</c> type is now obsolete.</summary>
3934
<remarks>
4035
<format type="text/markdown"><![CDATA[
4136
42-
## Remarks
43-
The `System.Net.Mail.SmtpClient` class is used to send email to an SMTP server for delivery. The SMTP protocol is defined in RFC 2821, which is available at [https://www.ietf.org](https://www.ietf.org/).
37+
## Remarks
38+
39+
The `SmtpClient` class is used to send email to an SMTP server for delivery. The SMTP protocol is defined in RFC 2821, which is available at [https://www.ietf.org](https://www.ietf.org/).
4440
4541
> [!IMPORTANT]
46-
> 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.
42+
> We don't recommend that you use the `SmtpClient` class for new development because `SmtpClient` doesn't support many modern protocols. Use [MailKit](https://github.com/jstedfast/MailKit) or other libraries instead. For more information, see [SmtpClient shouldn't be used](https://github.com/dotnet/platform-compat/blob/master/docs/DE0005.md) on GitHub.
43+
44+
The `SmtpClient` class is obsolete in Xamarin. However:
45+
46+
- It is included in the .NET Standard 2.0 and later versions and therefore must be part of any .NET implementation that supports those versions.
47+
- It is present and can be used in .NET Framework 4 through .NET Framework 4.8.
48+
- It is usable in .NET Core, but its use isn't recommended.
4749
48-
The classes shown in the following table are used to construct email messages that can be sent using <xref:System.Net.Mail.SmtpClient>.
50+
The classes shown in the following table are used to construct email messages that can be sent using <xref:System.Net.Mail.SmtpClient>.
4951
5052
|Class|Description|
5153
|-----------|-----------------|

0 commit comments

Comments
 (0)