I have got a webform where a user attaches a few documents and then hits the subit button.
These documents and the other form fields are to be emailed to a specified email id.
The approach I am considering is to save all the files in a folder on the web server and then attach each documents in the folder.
Please look at the code snippet. I am able to save the file but not sure how to attach each document within the folder to an email.
Private Sub SaveFiles(ByVal file As HttpPostedFile)
Dim path As String = Server.MapPath("~\WebFormsDocuments\")
path = path + value.ToString' value is a randomly generated number
System.IO.Directory.CreateDirectory(path)
file.SaveAs(path + value + file.FileName)
End Sub
Protected Sub SendEmail()
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentia ...
Go to the complete details ...