SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Feb 21, 2013, 05:57 #1
- Join Date
- Oct 2006
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
SendUsing error message upon submit
Hi there,
I am having a 500 server error coming up upon submitting a form which uses CDOSYS to format and send the email. The error is:
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/sendContact.asp, line 21
The code is the following.
Code:<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <% var myMail = Server.CreateObject("CDO.Message") myMail.Subject= "Website Enquiry" myMail.From= ""+Request.Form("email") myMail.To= "[hidden for security]" //myMail.Bcc= ""+Request.Form("bccrecipient") // you can also add a myMail.CC if you require, all fields support multiple addresses var dateToday = new Date() //creates the date of the enquiry // Generate the Body of the email by adding a line at a time, the top line always has to be = without the + myMail.HTMLBody +='<p><strong>Name:</strong> ' +Request.Form("name")+' </p>' //Use the apostrophe to finsih to break the code and then the plus to add in the form data, the name in brackets is the input field name of the submitted form myMail.HTMLBody +='<p><strong>Tel/Mobile:</strong> '+Request.Form("tel")+'</p>' myMail.HTMLBody +='<p><strong>Email:</strong> <a href="mailto:'+Request.Form("email")+'">'+Request.Form("email")+'</a></p>' myMail.HTMLBody +='<p><strong>Message:</strong><pre>' +Request.Form("message")+'</pre> </p>' myMail.HTMLBody +='<p><strong>Date / Time of enquiry:</strong> '+ dateToday+'</p>' //adds in the date generated earlier myMail.Send() //send the email myMail = "" //clears the memory Response.Redirect("http://www.google.co.uk") //redirects the user to the specified page //Response.Write("Form sent all ok, please change this to a response.redirect to send it to a thanks page") %>
Cheers,
Shoxt3r
-
Feb 21, 2013, 07:26 #2
- Join Date
- Oct 2002
- Location
- Scotland
- Posts
- 3,631
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
You haven't set any configuration.
http://www.powerasp.net/content/new/...ail_cdosys.asp
http://msdn.microsoft.com/en-us/libr...exchg.65).aspx
-
Feb 24, 2013, 10:15 #3
- Join Date
- Oct 2006
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmm that's odd.
It suddenly seems to have become a problem then since I have been receiving enquiries and been able to test successfully for a number of years without having to add any configuration or anything to the script as pasted above.
What would be the easiest way so that it links up with the data entered within input fields? e.g. forwarding the details entered within text fields marked with IDs in a specific format?
Bookmarks