MailAttachment from Stream

Results 1 to 2 of 2

Thread: MailAttachment from Stream

  1. #1
    Join Date
    Dec 1969

    Default MailAttachment from Stream

    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.

  2. #2
    Join Date
    Dec 1969

    Default RE: MailAttachment from Stream

    It seems a major limitation of the MailAttachment object is that it will only attach files existing on the server. I didn&#039;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&#039;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&#039;t know how already.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts