P
peter x
Hi Guyz,
I'm trying to write a simple email proggie in asp.net which allows users to
send attachments. I have no problems doing the email side of things but I
want the user to be able to upload the files they wish to use as
attachments. My current approach is:
1) Retrieve file attachments using Request.Files[n]
2) Call the HttpPostedFile.SaveAs(path) to store the file locally
3) Construct the MailMessage and add the saved files as MailAttachments
4) Call SmtpMail.Send(mailMessage)
5) Delete the uploaded files
Rather than save the uploaded files to the hard-drive, is there any way I
can create a MailAttachment directly from the HttpPostedFile?
Thanks for your help,
Peter
I'm trying to write a simple email proggie in asp.net which allows users to
send attachments. I have no problems doing the email side of things but I
want the user to be able to upload the files they wish to use as
attachments. My current approach is:
1) Retrieve file attachments using Request.Files[n]
2) Call the HttpPostedFile.SaveAs(path) to store the file locally
3) Construct the MailMessage and add the saved files as MailAttachments
4) Call SmtpMail.Send(mailMessage)
5) Delete the uploaded files
Rather than save the uploaded files to the hard-drive, is there any way I
can create a MailAttachment directly from the HttpPostedFile?
Thanks for your help,
Peter