Welcome to WebmasterWorld Guest from 54.146.240.181

Forum Moderators: phranque

Message Too Old, No Replies

CDOSYS email form to email error

     

tonynoriega

12:52 am on Jun 23, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



i keep getting this error on my processing page:

error '8004020e'
/contact_us/thankyou.asp, line 107

line 107 in my thankyou.asp is the .send parameter..?

i use a pretty simple form:

<form name="_form" method="post" action="thankyou.asp" onSubmit="return ValidForm()">

<label for="user">Name</label>
<input type="text" name="name" id="name" value="" /><br />

<label for="emailadd">Email Address:</label>
<input type="text" name="emailadd" id="emailadd" value="" /><br />

<label for="phone">Contact Number:</label>
<input type="text" name="phone" id="phone" value="" /><br />

<label for="interested">I am interested in:</label>
<input type="checkbox" name="design" class="boxes" id="design" />complete web design
<br />
<input type="checkbox" name="redesign" class="boxes2" id="redesign" />
site re-design
<br />
<input type="checkbox" name="seo" class="boxes2" id="seo" />
search engine optimization
<br />
<input type="checkbox" name="logo" class="boxes2" id="logo" />
logo development
<br />
<input type="checkbox" name="graphic" class="boxes2" id="graphic" />
graphic design<br />

<input type="checkbox" name="ppc" class="boxes2" id="ppc" />
pay per click campaign<br />

<input type="checkbox" name="print" class="boxes2" id="print" />
print material / brochures
<br />
<br />

<label for="comments">Comments:</label>
<textarea name="comments"></textarea>
<br />

<input type="submit" name="submitbutton" id="submitbutton" value="Submit" />

and here is my thankyou.asp page

<%
strName = request.form("name")
strEmail = request.form("emailadd")
strPhone = request.form("phone")
strDesign = request.form("desing")
strReDesign = request.form("redesign")
strSEO = request.form("seo")
strLogo = request.form("logo")
strGraphic = request.form("graphic")
strPPC = request.form("ppc")
strPrint = request.form("print")
strComments = request.form("comments")

sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserver") = "mail.mydomain.com"
.update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = request.form("emailadd")
.To = "anthony@mydomain.com"

.Subject = "WebSite Request Info Form: "
.HTMLBody = cdoMessage.HTMLBody & "<table width=500px border=1 bordercolor=blue cellpadding=0 cellspacing=0>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strName & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strEmail & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strPhone & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strDesign & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strReDesign & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strSEO & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strLogo & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strGraphic & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strPPC & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strPrint & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "<tr><td>Name: " & strComments & "</td></tr>"
.HTMLBody = cdoMessage.HTMLBody & "</table>"

.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing

%>

Receptional Andy

11:08 pm on Jun 23, 2008 (gmt 0)



I believe the error means that the SMTP server sending your message does not like the sender address. Does changing
.From = request.form("emailadd") 
to a valid email address work?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month