Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Email Attachment

Reply
Thread Tools

Email Attachment

 
 
peter x
Guest
Posts: n/a
 
      03-03-2004
Hi Guyz,

I'm trying to write a simple email proggie in asp.net which allows users to
send attachments. I have no problems doing the email side of things but I
want the user to be able to upload the files they wish to use as
attachments. My current approach is:

1) Retrieve file attachments using Request.Files[n]
2) Call the HttpPostedFile.SaveAs(path) to store the file locally
3) Construct the MailMessage and add the saved files as MailAttachments
4) Call SmtpMail.Send(mailMessage)
5) Delete the uploaded files

Rather than save the uploaded files to the hard-drive, is there any way I
can create a MailAttachment directly from the HttpPostedFile?

Thanks for your help,

Peter


 
Reply With Quote
 
 
 
 
Chad Z. Hower aka Kudzu
Guest
Posts: n/a
 
      03-03-2004
"peter x" <(E-Mail Removed)> wrote in news:eyorroWAEHA.220
@TK2MSFTNGP09.phx.gbl:
> Rather than save the uploaded files to the hard-drive, is there any way I
> can create a MailAttachment directly from the HttpPostedFile?


I dont think Web.Mail can do that - Im not positive though.

Indy definitely can, it supports attachments from memory.

www.indyproject.org

Its free.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Email::MIME and Email::MIME::Attachment::Stripper ecureuil Perl Misc 0 05-28-2006 01:47 AM
inlining a text/plain mime attachment into email Matthew Lenz Perl 0 02-22-2005 05:39 PM
HOWTO: Send an email w/ attachment? Sam ASP .Net 1 01-28-2004 10:34 PM
Email attachment from InputStream? steven shingler ASP .Net 1 01-20-2004 06:58 AM
email as attachment Dominik Eckelt Firefox 1 12-20-2003 08:13 AM



Advertisments