Reputation: 879
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
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