Email attachment from InputStream?

S

steven shingler

Hi all
I've figured out how to add an attachment to a MailMessage object from
a physical file on the hard disk, but would very much like to be able
to do this using an InputStream instead. This could be particularly
useful handling a PostedFile from a WebForm.
Has anyone got any ideas on this?
Best Wishes
Steven
 
S

Shiv Kumar

The MailAttachment class sadly only allows for physical files. So your only
option is to save a file (convert the stream to a file) and then attach that
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top