Sending e-mail from default Email Client (ex. Outlook,.. ) using c#, ASP.NET web site

Sauron

New Member
I'm working on my very first project, and I need to add a function as the button_click event. Function should open a "send new e-mail" form of the default email client, empty, without any destination,subject or body just with an attached file. I went through many similar tutorial on the stackoverflow and codeproject but couldn't solve it. I found similar functions which send a message from code, but not just open an empty e-mail form and attach the required file. But couldn't modify successfully. I'm sure there are people looking for this kind of solution as well.what I tried so far is :\[code\]protected void btnSend_Click(object sender, EventArgs e) { string value; value = http://stackoverflow.com/questions/12578522/lstpdfList.SelectedItem.Text; string file ="W:/" + value + ".pdf"; MailMessage message = new MailMessage(); Attachment data = http://stackoverflow.com/questions/12578522/new Attachment(file, MediaTypeNames.Application.Octet); ContentDisposition disposition = data.ContentDisposition; disposition.CreationDate = System.IO.File.GetCreationTime(file); disposition.ModificationDate = System.IO.File.GetLastWriteTime(file); disposition.ReadDate = System.IO.File.GetLastWriteTime(file); message.Attachments.Add(data); }\[/code\]Thank you for your help in advance.
 
Back
Top