MailBee.NET Objects 6.0

MailMessage.Attachments Property

Gets the AttachmentCollection object containing the attachments of the mail message.

public AttachmentCollection Attachments {get;}

Property Value

An AttachmentCollection object containing all the attachments of the mail message. The default value is an empty collection.

Remarks

Although Attachments property itself is read-only, the collection it returns can be modified through its Add, Clear, Remove, RemoveAt and other methods.

The developer can iterate through this collection using foreach operator (For Each in Visual Basic), access individual attachments using Item property, or use SaveAll method to save all attachments into a folder with a single method call.

Example

The example is available in AttachmentCollection topic.

See Also

MailMessage Class | MailBee.Mime Namespace