none
Please help (An error occurred on the server when processing the URL. Please contact the system administrator)

    Question

  • Hello,

    Can someone please help me where I am doing wrong? I have the following asp code (which used to work before but not now) for my contact form:

    <%
    form_from = "x@x.com"
    form_to = "x@x.com"
    form_cc = Request.Form("mail_cc")
    form_bcc = Request.Form("mail_bcc")
    form_subject = "Form Submission"
    form_importance = 1

    FOR x = 1 TO Request.Form.Count
    IF Request.Form.Key(x) = "mail_from" OR Request.Form.Key(x) = "mail_to" OR Request.Form.Key(x) = "mail_cc" OR Request.Form.Key(x) = "mail_bcc" OR Request.Form.Key(x) = "mail_subject" OR Request.Form.Key(x) = "mail_importance" OR Request.Form.Key(x) = "mail_redirect" OR Request.Form.Key(x) = "mail_send" OR Request.Form.Key(x) = "Submit" THEN
    form_variables = form_variables
    ELSE
    form_variables = form_variables & Request.Form.Key(x) & ": " & vbcrlf & Request.Form.Item(x) & vbcrlf & vbcrlf
    END IF
    NEXT

    DIM body_text
    body_text = vbcrlf & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
    body_text = body_text & form_subject & vbcrlf
    body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf & vbcrlf
    body_text = body_text & form_variables
    body_text = body_text & "Sent from: " & vbcrlf & Request.ServerVariables("HTTP_REFERER") & vbcrlf & vbcrlf
    body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf


    <!--SET objMail = Server.CreateObject("CDONTS.NewMail")-->

    SET objMail = CreateObject("CDO.Message")

    <!--objMail.BodyFormat = 1-->
    <!--objMail.MailFormat = 1-->

    objMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

    objMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
    ="mail.x.com"

    objMail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
    =25
    objMail.Configuration.Fields.Update


    objMail.From = form_from
    objMail.To = form_to
    objMail.CC = form_cc
    objMail.BCC = form_bcc
    objMail.Subject = form_subject
    <!--objMail.Importance = form_importance-->
    objMail.TextBody = body_text
    objMail.Send
    SET objMail = NOTHING

    Response.Write("")
    %>

    AND

    I receive this message when I submit the form:

    An error occurred on the server when processing the URL. Please contact the system administrator.

    If you are the system administrator please click here to find out more about this error.

    Thank you very much in advance.

    Thursday, December 06, 2012 12:06 AM