Home All Groups Group Topic Archive Search About

Net.Mail attachments

Author
7 Feb 2007 7:36 PM
Arne
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?

--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)

Author
8 Feb 2007 11:39 AM
Bruno Alexandre
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"


Show quote
"Arne" <A***@discussions.microsoft.com> wrote in message
news:E97F3AA5-1508-476D-812E-0444C3B106DB@microsoft.com...
>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?
>
> --
> Arne Garvander
> (I program VB.Net for fun and C# to get paid.)
Author
8 Feb 2007 5:52 PM
Arne
Tack.
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)


Show quote
"Bruno Alexandre" wrote:

>
> 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"
>
>
> "Arne" <A***@discussions.microsoft.com> wrote in message
> news:E97F3AA5-1508-476D-812E-0444C3B106DB@microsoft.com...
> >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?
> >
> > --
> > Arne Garvander
> > (I program VB.Net for fun and C# to get paid.)
>
Author
9 Feb 2007 9:13 AM
Bruno Alexandre
it's "tak" ;-)


--

Bruno Alexandre
Strøby, Danmark

"a Portuguese in Denmark"


Show quote
"Arne" <A***@discussions.microsoft.com> wrote in message
news:2F74633F-955D-4253-B6F6-39368779E1ED@microsoft.com...
> Tack.
> --
> Arne Garvander
> (I program VB.Net for fun and C# to get paid.)
>
>
> "Bruno Alexandre" wrote:
>
>>
>> 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"
>>
>>
>> "Arne" <A***@discussions.microsoft.com> wrote in message
>> news:E97F3AA5-1508-476D-812E-0444C3B106DB@microsoft.com...
>> >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?
>> >
>> > --
>> > Arne Garvander
>> > (I program VB.Net for fun and C# to get paid.)
>>

AddThis Social Bookmark Button