Click here to Skip to main content
12,630,137 members (28,678 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
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 5-Nov-12 23:37pm
Comments
ryanb31 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100