Zack HootsC22F
New Member
Does anyone know how to create a MailAttachment from a stream? My code doesn't have permissions to save files on my host's server, so I can't just save the stream to a file and then attach it. I'm getting the image file from a form submission, if that helps. Thanks.It seems a major limitation of the MailAttachment object is that it will only attach files existing on the server. I didn't see anyway around it. But I did think of some other ways around it:<BR><BR>If you have access to a database, you could try to store the image in there, then email a link to a page that will display the image, then the user can save it through the browser.<BR><BR>If you don't have access to a database either, you might try putting the data from the stream in the web Application variable collection or Cache collection. Then make a page that will read them from cache and display to the user. Both of those are pretty bad places to put large amouts of data, but it would work at least.<BR><BR>There have been a few good posts on this board reciently about how to save/retrieve images from a database if you don't know how already.