Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email and attachments 1

Status
Not open for further replies.

shiggyshag

Programmer
Dec 14, 2001
227
GB
Hi all

I am using asp to do e-mail ie CDONTS.NewMail which works great.

No wthe problemI have is sending attachments. Now if im right you have to upload the file on the server before you can send it. Now I have an upload asp which is slow but works but my problem is getting it all to work together.

Has any one done this before if so how.
or has any one got any ideas??

Cheers
 
Code:
<%
dim objMail
dim filePathName
dim fileDescr

filePathName = &quot;e:\inetpub\somefile.ext&quot;
fileDescr = &quot;File Description&quot;

set objMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
objMail.To = &quot;to@mail.com&quot;
objMail.From = &quot;from@mail.com&quot;
objMail.Subject = &quot;File Attached&quot;
objMail.Body = &quot;Attached is the file you requested.&quot;
objMail.AttachFile filePathName, fileDescr
objMail.Send
set objMail = Nothing
%>
ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top