SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2006
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 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")
    %>
    Any ideas please?

    Cheers,

    Shoxt3r

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2006
    Posts
    153
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •