[thelist] email attachments using ASP

Chris Marsh chris at ecleanuk.com
Tue Jun 24 10:28:21 CDT 2003


> http://www.codeproject.com/useritems/send_email_attach_asp.asp

That's the easy bit ;) I guess the difficult bit for James is getting
the file to be attached from the local HDD up the pipe to the server.
One could use one of many COM objects (at a price), but it's also
possible to use pure ASP. Check out
http://www.asp101.com/articles/jacob/scriptupload.asp.

> i am new to ASP and need to create a form that lets
> users to attach a file from their local hard drive and
> then send an email to the admin with that attachement.
> i understand the concepts that this file has to be
> uploaded to the server first before being attached. i
> got stuck trying to figure out the code itself and
> could not find any good examples on the Net. 
> 
> can anyone recommend any resources, links or provide
> some sample code on how to do it? i am confused along
> the full spectrum of this: how to specify an
> attachment at the html form level and all the way up
> to the sending mail with that file attached. 

Save the file to the server HDD when it's uploaded. Attach, send and
delete it. Alternatively there's probably a way to keep the data in
memory on the server and build the attachment from that; I don't know
CDONTS well enough offhand to tell you how to do it.

[..]

Regards

Chris Marsh



More information about the thelist mailing list