Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid




Here is the code..



dim EmailBody, objEmailAlert
if request.form("form")<>"" then


EmailBody = "<html>" & vbCrlf _
& "<body>" & vbCrlf _
& "<font face='Arial' size='2' color='#000000'>" & vbCrlf _
& "<br>The contact form has been submitted. Details are as follows: " & vbCrlf
EmailBody = EmailBody & "<br><b>Name: </b>" & Request.Form("fname") & " " & Request.Form("lname") & vbCrlf
EmailBody = EmailBody & "<br><b>Company: </b>" & Request.Form("company") & vbCrlf
EmailBody = EmailBody & "<br><b>Position: </b>" & Request.Form("position") & vbCrlf
EmailBody = EmailBody & "<br><b>Phone: </b>" & Request.Form("phone") & vbCrlf
EmailBody = EmailBody & "<br><b>Email: </b>" & Request.Form("email") & vbCrlf
EmailBody = EmailBody & "<br><b>Hear about Us: </b>" & Request.Form("hearabout") & vbCrlf
EmailBody = EmailBody & "<br><b>Inquiry Type: </b>" & Request.Form("type") & vbCrlf
EmailBody = EmailBody & "<br><b>Inquiry: </b>" & Request.Form("message") & vbCrlf


EmailBody = EmailBody & "</font>" & vbCrlf _
& "</body>" & vbCrlf _
& "</html>"
Set objEmailAlert = Server.CreateObject("CDO.Message")
objEmailAlert.From = "<contactus@limited.com>"
objEmailAlert.To = "contact1@limited.com"
objEmailAlert.Bcc = "contact2@limited.com"
objEmailAlert.Subject = "Contactus Submission"
objEmailAlert.HTMLBody = EmailBody

' objEmailAlert.BodyFormat = 0
' objEmailAlert.MailFormat = 0

objEmailAlert.Send
Response.Write("email sent")
Set objEmailAlert = Nothing
Response.Redirect("thankyou.html")
end if%>

<style type="text/css">
<!--
Posted
Comments
ZurdoDev 8-Nov-12 11:50am    
A quick google search on your code gave this, http://forums.iis.net/t/1146477.aspx.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900