Skip to main content
Inspiring
May 6, 2008
Question

Problem with email form

  • May 6, 2008
  • 3 replies
  • 649 views
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.
This topic has been closed for replies.

3 replies

Inspiring
May 7, 2008
Sorry - no idea. I assume you made the change correctly?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Charles67" <webforumsuser@macromedia.com> wrote in message
news:fvqoqb$hng$1@forums.macromedia.com...
>I tried as you suggested and now have a different error message:
>
> Cannot modify or delete an object that was added using the COM+ Admin SDK
> /acg/messageSent.asp, line 14
>
> Line 14 is: cdoMessage.Send
>
> Can you make another suggestion? I appreciate your help.
> Charles
>

Charles67Author
Inspiring
May 6, 2008
I tried as you suggested and now have a different error message:

Cannot modify or delete an object that was added using the COM+ Admin SDK /acg/messageSent.asp, line 14

Line 14 is: cdoMessage.Send

Can you make another suggestion? I appreciate your help.
Charles
Inspiring
May 6, 2008
cdoMessage.From=Request.Form("myemailAddress@sbcglobal.net")

maybe should be -

cdoMessage.From="myemailAddress@sbcglobal.net"


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Charles67" <webforumsuser@macromedia.com> wrote in message
news:fvohnf$4dc$1@forums.macromedia.com...
>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.
>
>
> <%
> 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
> %>
>