System.Net.Mail.MailMessage.Attachments Property

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

Syntax

public AttachmentCollection Attachments { get; }

Value

Documentation for this section has not yet been entered.

Remarks

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.

Requirements

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