I'm using system.web.mail to send email because I need to supprt smtp port 465 SSL and the newer system.net.mail does not do that (see http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.enablessl.aspx). To add attachments using the older system.web.mail the attachments must be read from a file, no other way to do it according to http://www.systemwebmail.com/faq/2.3.aspx.
So I have the file in a memory stream, I need to write it to the hard drive on the server, attach them to the email, then delete them at some point, but probably not until the email has been delivered.
So a few questions:
1. How to save the contents of a memory stream to a disk file?
2. I will need read/write permission to a folder, can this be resonably expcected to work on a commercial hosting account?
...
Go to the complete details ...