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.
Any ideas please?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




Reply With Quote


Bookmarks