This documentation is archived and is not being maintained.

MailMessage.Attachments Property

Specifies the collection of attachments that are transmitted with the message.

[Visual Basic]
Public ReadOnly Property Attachments As IList
[C#]
public IList Attachments {get;}
[C++]
public: __property IList* get_Attachments();
[JScript]
public function get Attachments() : IList;

Property Value

An IList collection of MailAttachment objects.

Remarks

New attachments can be added to the mail message by a call to Message.Attachments.Add(MyMailMessage). See Send for an example of SmtpMail usage.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

MailMessage Class | MailMessage Members | System.Web.Mail Namespace

Show: