Skip to content

Commit dfb1fef

Browse files
Jan JahodaJan Jahodacarlossanlop
authored
Add SmtpClient.SendMailAsync cancellation doc (#4749)
* SmtpClient.SendMailAsync doc * Apply suggestions from code review Co-authored-by: Carlos Sanchez <[email protected]> Co-authored-by: Jan Jahoda <[email protected]> Co-authored-by: Carlos Sanchez <[email protected]>
1 parent 4a6f04a commit dfb1fef

File tree

1 file changed

+41
-13
lines changed

1 file changed

+41
-13
lines changed

xml/System.Net.Mail/SmtpClient.xml

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,11 +1640,20 @@ The classes shown in the following table are used to construct email messages th
16401640
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="net-5.0" />
16411641
</Parameters>
16421642
<Docs>
1643-
<param name="message">To be added.</param>
1644-
<param name="cancellationToken">To be added.</param>
1645-
<summary>To be added.</summary>
1646-
<returns>To be added.</returns>
1647-
<remarks>To be added.</remarks>
1643+
<param name="message">The message to send.</param>
1644+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
1645+
<summary>Sends the specified message to an SMTP server for delivery as an asynchronous operation.</summary>
1646+
<returns>The task object representing the asynchronous operation.</returns>
1647+
<remarks>
1648+
<format type="text/markdown"><![CDATA[
1649+
1650+
## Remarks
1651+
This operation will not block. The returned <xref:System.Threading.Tasks.Task> object will complete once the message has been sent.
1652+
1653+
]]></format>
1654+
</remarks>
1655+
<exception cref="T:System.ArgumentNullException">
1656+
<paramref name="message" /> is <see langword="null" />.</exception>
16481657
</Docs>
16491658
</Member>
16501659
<Member MemberName="SendMailAsync">
@@ -1737,14 +1746,33 @@ The classes shown in the following table are used to construct email messages th
17371746
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="4" FrameworkAlternate="net-5.0" />
17381747
</Parameters>
17391748
<Docs>
1740-
<param name="from">To be added.</param>
1741-
<param name="recipients">To be added.</param>
1742-
<param name="subject">To be added.</param>
1743-
<param name="body">To be added.</param>
1744-
<param name="cancellationToken">To be added.</param>
1745-
<summary>To be added.</summary>
1746-
<returns>To be added.</returns>
1747-
<remarks>To be added.</remarks>
1749+
<param name="from">The address information of the message sender.</param>
1750+
<param name="recipients">The addresses that the message is sent to.</param>
1751+
<param name="subject">The subject line for the message.</param>
1752+
<param name="body">The message body.</param>
1753+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
1754+
<summary>Sends the specified message to an SMTP server for delivery as an asynchronous operation, using the specified sender, recipients, subject, and body strings.</summary>
1755+
<returns>The task object representing the asynchronous operation.</returns>
1756+
<remarks>
1757+
<format type="text/markdown"><![CDATA[
1758+
1759+
## Remarks
1760+
This operation will not block. The returned <xref:System.Threading.Tasks.Task> object will complete once the message has been sent.
1761+
1762+
]]></format>
1763+
</remarks>
1764+
<exception cref="T:System.ArgumentNullException">
1765+
<paramref name="from" /> is <see langword="null" />.
1766+
1767+
-or-
1768+
1769+
<paramref name="recipients" /> is <see langword="null" />.</exception>
1770+
<exception cref="T:System.ArgumentException">
1771+
<paramref name="from" /> is <see cref="F:System.String.Empty" />.
1772+
1773+
-or-
1774+
1775+
<paramref name="recipients" /> is <see cref="F:System.String.Empty" />.</exception>
17481776
</Docs>
17491777
</Member>
17501778
<Member MemberName="ServicePoint">

0 commit comments

Comments
 (0)