SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    0 Post(s)
    0 Thread(s)

    Question contact form classic asp help!

    Hi there,

    Im new to this website but I have a big problem with fasthosts. I run code to send an email for a hairdressers and it runs on every other server I have tested except fasthosts. Ive even tried their own code and it doesnt work.

    this is the message i get:

    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.

    Im a front end designer so am not hard core with code (although I do know a bit), i know that 500 error means there is no file there yet when I check the ftp connection the file is there. Just wondering if anyone can help, I will post my code as follows:


    <form id="contact_form" class="content_form" method="post" action="contactconfirmation.asp">

    <p><label class="name_label" for="form_name">Your name*</label>
    <input type="text" name="name" id='form_name' class="textbox" /></p>

    <p><label class="email_label" for="form_email">Your e-mail*</label>
    <input type="text" name="email" id='form_email' class="textbox"/></p>

    <p> <label class="message_label" for="form_message">Your message*</label> <textarea name="message" id='form_message' rows="6" cols="25" class="textbox"></textarea> </p>

    <p><input type="button" name="submit" id="form_submit" value="Submit" class="button submit_button" /></p>

    <!-- hidden input for basic spam protection -->
    <div class='hide'>
    <label for='spamCheck'>Do not fill out this field</label>
    <input id="spamCheck" name='spam_check' type='text' value='' />

    <span id="loader"></span>

    <!-- This div will be shown if mail was sent successfully -->
    <div class="hide success">
    <p>Thanks! Your email has been sent.</p>



    Set Mailer = CreateObject("CDO.Message")
    Mailer.From= "" = ";"
    Mailer.Subject = "Enquiry for hair salon website"
    if request("action") = "Submit" then
    HTML = HTML & "<h1>Query from BOB Website</h1>"
    HTML = HTML &"<table>"
    HTML = HTML & ins("Name","name")
    HTML = HTML & ins("Email","email")
    HTML = HTML & ins("Message","message")
    if instr(request("Message"),"http")>0 then
    response.write "<h1>An Error Occured - No Links in Message Allowed</h1>r"
    end if
    HTML = HTML &"</table>"
    Mailer.HTMLBody = HTML
    end if

    function ins(field,data)
    theField = request(data)
    ins = "<tr><td>"&field&"</td><td>"&thefield&"</td></tr>"
    end function

    I still get the error and I cant figure it out? any help would be great.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2009
    1 Post(s)
    0 Thread(s)
    In your browser settings try turning off "show friendly http errors" and maybe you'll get an informative error message.
    Doug G
    "If you ain't the lead dog, the view is always the same - Anon

  3. #3
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    0 Post(s)
    0 Thread(s)
    First remove ";" that is at the end of email and try again.
    If the above does not fix the issue than you may need to adjust web.config to allow detailed error message.
    Also on many servers CDO object requires authentication, smtp address and smtp port as well.


Posting Permissions

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