PDA

View Full Version : CDO.Message.1 error '80070003' The system can't find the path specified



KirstyB
26 Sep 2007, 05:03 AM
Hi,
I'm trying to create a simple form that emails its contents using .asp. I'm not a programmer but through various online tutorials I have created this:

My form:
<form method="POST" action="email.asp" style="float:left; padding:0.7em 1.7em 0 0;" >
<table>
<tr>
<td>Name: </td>
<td> <input name="From" type="text" size="30"/></td>
</tr>
<tr>
<td>Email: </td>
<td> <input name="Email" type="text" size="30"/></td>
</tr>
<tr>
<td>Message: </td>
<td><textarea name="Body" cols="24" rows="6" id="Body"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" /></td>
</tr>
</table>
</form>

and this is my code in email.asp:
<%
Set objEMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
Confi.Update
Set objEMail.Configuration = objConfig
objEMail.To = "test@hotmail.com"
objEMail.From = request.form("From")
objEMail.Subject = "Query from Makefast website"
strBody = strBody & "Name: " & Request.Form("From") & vbCrLf
strBody = strBody & "E-mail: " & Request.Form("Email") & vbCrLf
strBody = strBody & "Message: " & Request.Form("Body") & vbCrLf
objEMail.TextBody = strBody
objEMail.Send
Set objEMail = Nothing

Response.Redirect "http://www.makefast.com/contact_sent.asp"
%>
%>

Originally Response.Redirect was "contact_sent.asp" and when I tested on Localhost it worked perfectly. I then checked various forums which said I needed an absolute path so I changed it to http://..... but, although it still works locally when I put it live on www.makefast.com I get this error:

CDO.Message.1 error '80070003'
The system can't find the path specified
/email.asp, line 16

Line 16 is objEMail.Send. I've read loads of forums about getting this error when trying to add attachments but I'm not trying to do that.

Can anyone point out what I've done wrong?
The live page can be seen at:
http://www.makefast.com/contact.asp

Thanks