Question
Problem with email form
I am trying to work through the book Dreamweaver CS3 with
ASP, Coldfusion and PHP and I can't get the form to email in
chapter 5 to work. I get the following error message:
Error Type:
CDO.Message.1 (0x8004020D)
At least one of the From or Sender fields is required, and neither was found.
As far as I can see I have both the from and send fields. Below is my code:
<%
theSchema=" http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig=server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(theSchema & "sendusing")= 2
cdoConfig.Fields.Item(theSchema & "smtpserver")="smtp.att.yahoo.com"
cdoConfig.Fields.Update
set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration=cdoConfig
cdoMessage.From=Request.Form("myemailAddress@sbcglobal.net")
cdoMessage.To="myemailAddress@sbcglobal.net"
cdoMessage.Subject=Request.Form("subject")
cdoMessage.TextBody=Request.Form("messageBody")
cdoMessage.Send
Set cdoMessage=Nothing
Set cdoConfig=Nothing
%>
Can anyone see my errors.
Error Type:
CDO.Message.1 (0x8004020D)
At least one of the From or Sender fields is required, and neither was found.
As far as I can see I have both the from and send fields. Below is my code:
<%
theSchema=" http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig=server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(theSchema & "sendusing")= 2
cdoConfig.Fields.Item(theSchema & "smtpserver")="smtp.att.yahoo.com"
cdoConfig.Fields.Update
set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration=cdoConfig
cdoMessage.From=Request.Form("myemailAddress@sbcglobal.net")
cdoMessage.To="myemailAddress@sbcglobal.net"
cdoMessage.Subject=Request.Form("subject")
cdoMessage.TextBody=Request.Form("messageBody")
cdoMessage.Send
Set cdoMessage=Nothing
Set cdoConfig=Nothing
%>
Can anyone see my errors.
