Skip to main content
Participant
December 7, 2006
Question

Error in CDO Mail.

  • December 7, 2006
  • 2 replies
  • 506 views
I am getting an error that I never got before on a CDO script that I have use in the past before...can you help out please can't seem to figure this one out. I am using DW8, VBScript and ASP.



<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
Dim myMail, myBody
myBody = "Full Name: " & request.form("full_name") & vbcrlf & "Email: " & request.form("email") & vbcrlf & "Phone Number: " & request.form("phone_number") & vbcrlf & "Contact Type: " & request.form("contact_type") & vbcrlf & "Question/Comment: " & request.form("question_comments")

Set myMail = Server.CreateObject("CDONTS.NewMail")
myMail.From = request.form("email")
myMail.To = "brewers@bigfootdesigns.com"
myMail.cc = ""
myMail.Subject = "MRP Arenacross Question & Comments"
myMail.Body = myBody
myMail.Send
set myMail = nothing

Response.Redirect("contact_thanks.asp")
%>

Here is the error message that I am getting

Microsoft VBScript compilation error '800a0408'

Invalid character

/mrp/html/contact_mrp_processor.asp, line 9

myMail.To = brewers@bigfootdesigns.com
-----------------------------^

Here is the URL http://bigfootdesigns.com/mrp/html/contact_mrp.asp


thanks

B
This topic has been closed for replies.

2 replies

Dogger35Author
Participant
December 7, 2006
Ok I fixed it. Turns out the Hosting company switched over to 2003 server and it no longer uses CDONTS. Here is the modied code that worked..

<%
Dim myMail
Dim myBody
myBody = "Full Name: " & request.form("full_name") & vbcrlf & "Email: " & request.form("email") & vbcrlf & "Phone Number: " & request.form("phone_number") & vbcrlf & "Contact Type: " & request.form("contact_type") & vbcrlf & "Question/Comment: " & request.form("question_comments")

Set myMail = Server.CreateObject("CDO.Message")
myMail.From = request.form("email")
myMail.To = "brewers@bigfootdesigns.com"
myMail.cc = ""
myMail.Subject = "MRP Arenacross Question & Comments"
myMail.TextBody = myBody
myMail.Send
set myMail = nothing

Response.Redirect("home.htm")
%>


FYI


B
Inspiring
December 7, 2006
Try

http://classicasp.aspfaq.com/general/why-do-i-get-800a0408-errors.html

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004