Scripting Question: Please Help! RRS feed

  • Question

  • User486715212 posted

    My web forms were working just fine until my files were switched from a IIS 6 server to a IIS 7 server.  Now I get an error on my forms after submitting.  The forms are set up to send the information to an e-mail address.  The form is html and the file that tells it what to do with the information is asp.  I'm using DreamWeaver.  The server's customer support says that the old server did not require you to include the mailserver in the code and the new one does so maybe thats the problem, but I don't know how exactly to change the code for that.  Can someone please help me! 

    Here is the error message I get: 

    CDO.Message.1 error '80040220'

    The "SendUsing" configuration value is invalid.

    /FormHandler5.asp, line 44


    And here is my code:  I have bolded line 44 which it says is the problem

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>FormHandler5.asp using IIS object model and Java Script language</title>

    <h1>Thank you for sharing MRN's website with a friend! </h1>
    <h2>Your friend will receive a link to the MRN website by e-mail shortly.</h2>
    <h3>Your Information is Confirmed</h3>
    YourName = Request.Form("YourName");
    YourEmail = Request.Form("YourEmail");
    FriendName = Request.Form("FriendName");
    FriendEmail = Request.Form("FriendEmail");
    Comments = Request.Form("Comments");

    // Confirm form data to web

    Response.Write("YourName = " + YourName + "<br>");
    Response.Write("YourEmail = " + YourEmail + "<br>");
    Response.Write("FriendName = " + FriendName + "<br>");
    Response.Write("FriendEmail = " + FriendEmail + "<br>");
    Response.Write("Comments = " + Comments + "<br>");

    // Format form data for email

    MailForm = "";
    MailForm = MailForm + "YourName = " + YourName + "\n";
    MailForm = MailForm + "YourEmail = " + YourEmail + "\n";
    MailForm = MailForm + "FriendName = " + FriendName + "\n";
    MailForm = MailForm + "FriendEmail = " + FriendEmail + "\n";
    MailForm = MailForm + "Comments = " + Comments + "\n";

    // Email the form

    smtp = Server.CreateObject("CDO.Message");
    smtp.From = "Form.Handler5@morecovery.org";
    smtp.To = "bfrank@actmissouri.org";
    smtp.Subject = "Share With A Friend";
    smtp.TextBody = MailForm;


    Thank you for any help that is given!!!!! 

    Wednesday, February 4, 2009 2:42 PM

All replies

  • Wednesday, February 4, 2009 3:59 PM
  • User-2064283741 posted

    The sending mail has changed in IIS 7 there is no default SMTP module.

    This thread should help you


    Wednesday, February 4, 2009 4:00 PM
  • User486715212 posted

     I appreciate the help, but I can't seem to get it to work.  I'm new at this web stuff.  I tried to use the code from the link, putting in my own information, but it didn't work.  Maybe I'm not putting it in the right place.  I put it in after "// Email the form" in my code and took the smtp stuff out.  Was that correct?  If you have coding that will work, could you please tell me exactly where to place it in my existing code?  Sorry I'm not more knowledgeable.

    Wednesday, February 4, 2009 5:22 PM
  • User1073881637 posted

    Here is sample syntax that includes the mail server options.


    Wednesday, February 11, 2009 2:44 AM