Forums
This topic is locked
Error Message on Page
Posted 10 Mar 2006 00:23:56
1
has voted
10 Mar 2006 00:23:56 Scott Kemp posted:
Hi people,I am trying to Upload a file to my server and then send it via email.
I did have it working but for some reason it appears to give me the error of:
<b>error '80004005'
/fresh/Upload.asp, line 14 </b>
It is a basic HTML form posting to Upload.asp page, I htink it is going wrong on the AttachFile bit as the file is actually being uploaded to the server.
The code I am using to do this upload and send is below:
< %
Set Upload = Server.CreateObject("Persits.Upload"
Upload.Save Server.MapPath("images"
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.From = Upload.Form("Sender"
objCDO.Subject = Upload.Form("Subject"
objCDO.To = Upload.Form("Recipient"
objCDO.Body = Upload.Form("Message"
Response.Write("Hello"
For Each File in Upload.Files
fn = File.ExtractFilename
objCDO.AttachFile Server.MapPath(fn), fn
next
objCDO.Send
Set objCDO = Nothing
Response.Redirect "Default.asp"
% >
Could someone see what I am doing wrong or give me some help ?
Many Thanks
Scott Kemp