homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
CDOSYS email form to email error
tonynoriega

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3681105 posted 12:52 am on Jun 23, 2008 (gmt 0)

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



 
Msg#: 3681105 posted 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?
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved