Net.Mail attachments

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to attach a file to an email. This is the file:
HttpPostedFile f = ResumeUpload.PostedFile;
Stream i = f.InputStream;
string buf = i.EndRead();
How can I attach this file directly from memory without writing it to disk
first?
 
if you have the Stream, why dont you just attach it ???


NetMail.Attachments.Add(New System.Net.Mail.Attachment(i, New
Net.Mime.ContentType("WHAT_MIME_YOU_WANT")))

--

Bruno Alexandre
Strøby, Danmark

"a Portuguese in Denmark"
 
Tack.
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)


Bruno Alexandre said:
if you have the Stream, why dont you just attach it ???


NetMail.Attachments.Add(New System.Net.Mail.Attachment(i, New
Net.Mime.ContentType("WHAT_MIME_YOU_WANT")))

--

Bruno Alexandre
Strøby, Danmark

"a Portuguese in Denmark"
 
Back
Top