Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 error w/fairly simple send-mail script
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mykel_suthertun
Junior Member

USA
227 Posts

Posted - 20 January 2005 :  22:35:39  Show Profile  Visit mykel_suthertun's Homepage
I'm having trouble implementing a fairly basic send-email script. Can someone please help me out? Thanks!

The error:
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/inc/send_contact.asp, line 23
My code:
<%
Set myMail=CreateObject("CDO.Message")

myMail.Subject="Contact from dontsaydie.com"
myMail.From="noreply@mydomain.com"

if Request.Form("email_to") = "none" then myMail.To = "webmaster@mydomain.com"
if Request.Form("email_to") = "Shaun" then myMail.To = "shaun@mydomain.com"
if Request.Form("email_to") = "Randy" then myMail.To = "randy@mydomain.com"
if Request.Form("email_to") = "Ray" then myMail.To = "ray@mydomain.com"
if Request.Form("email_to") = "Brian" then myMail.To = "brian@mydomain.com"
if Request.Form("email_to") = "Booking" then myMail.To = "brian@mydomain.com"
if Request.Form("email_to") = "Marketing" then myMail.To = "brian@mydomain.com"
if Request.Form("email_to") = "Website" then myMail.To = "webmaster@mydomain.com"

HTML = HTML & "This e-mail was sent through the contact page at dontsaydie.com/contact.asp at " & now() & ". Do not respond to this e-mail! Use the contact information, if any, that has been provided by the user below."
HTML = HTML & "<br><hr><br>"
HTML = HTML & "Contact Information: " & Request.Form("name")
HTML = HTML & "<br><br>"
HTML = HTML & Request.Form("message")

myMail.TextBody = HTML
myMail.Send

Response.write("Your message was sent. Press your browsers back button to return to the site.")
%>

Mike Southerton
Webmaster | Don'tSayDie.com | DriveThe.com

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 21 January 2005 :  02:59:12  Show Profile
Mike,

I have a pretty simple contact form if you want a copy, it does error checking as well. I can send you the contact form, and the sent contact page also if you want. I have it in CDONTS, CDO or aspSmartMail if you want. Let me know and I will zip them up and send them to you.

Cheers,

David Greening
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07