System.Net.Mail.MailMessage.Attachments Property

Gets the attachment collection used to store data attached to this e-mail message.


public AttachmentCollection Attachments { get; }


Documentation for this section has not yet been entered.


Use the collection returned by the MailMessage.Attachments property to add an attachment, such as a file or the contents of a System.IO.Stream, to this System.Net.Mail.MailMessage.

Create an System.Net.Mail.Attachment that contains or references the data to be attached, and then add the System.Net.Mail.Attachment to the collection returned by MailMessage.Attachments.


Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0