ahmed
ahmed

Reputation: 879

how to attach multiple files as e-mail attachment in vb.net?

How do I attach multiple files as e-mail attachments in vb.net? I am trying to use a list box where user will select the file and attach which will appear in a listbox. And also I would like to give the option to delete the attachment also.

Upvotes: 2

Views: 3162

Answers (1)

Inisheer
Inisheer

Reputation: 20794

http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx

MailMessage.Attachments is a collection.

Try below for each file in your list

message.Attachments.Add(attachment)

Upvotes: 2

Related Questions