ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Contact Form not posting

October 30, 2009 6:16am

Subscribe [3]
  • #1 / Oct 30, 2009 6:16am

    shellfish

    48 posts

    Hey all,

    I’m having an issue with my contact form - it doesn’t seem to post - well actually VERY occasionally it does which is just plain odd! I wonder if someone would look at my code and offer a suggestion? Thanks
    Shell

    Here’s my code:

    {exp:email:contact_form user_recipients="false" recipients="myemailaddresshere" charset="utf-8" return="http://www.getashot.co.uk"}
    
    <label for="from">Your Email:</label>
    
    <input type="text" id="from2" name="from" size="40" maxlength="35" /></p>
    
    <label for="subject">Subject:</label>
    
    <input type="text" id="subject2" name="subject" size="40"  /></p>
    
    <label for="message">Message:</label>
    
    <textarea id="message2" name="message" rows="8" cols="30"></textarea>
    
    <input name="submit" type='submit' value='Send' /></p>
    
    {/exp:email:contact_form}
  • #2 / Oct 30, 2009 10:57am

    Sue Crocker

    26054 posts

    shellfish, make sure you can send email via Communicate first.

    Does that help?

  • #3 / Oct 30, 2009 11:10am

    shellfish

    48 posts

    Hey Sue,

    Just tested mailing through the communicate area which works fine

    Any thoughts?

    Shell

  • #4 / Oct 30, 2009 11:21am

    Sue Crocker

    26054 posts

    Were you mailing to the same email address you tried in the contact form?

  • #5 / Oct 30, 2009 11:34am

    shellfish

    48 posts

    No a different one - shall I give that I try?

  • #6 / Oct 30, 2009 11:37am

    shellfish

    48 posts

    Just tried another email through the communicate and still works fine

  • #7 / Oct 30, 2009 11:39am

    Ingmar

    29245 posts

    What version and build are you on? Do you’ve got a link?

  • #8 / Oct 30, 2009 11:42am

    shellfish

    48 posts

    Hey,

    I’m running on:  ExpressionEngine v 1.6.4

    Here’s the link:

    http://ow.ly/xEgN

    Thanks

    Shell

  • #9 / Oct 30, 2009 11:46am

    Ingmar

    29245 posts

    Did it ever work, breaking all of a sudden, or are you trying to get it to work for the first time? Also, if at all possible, consider upgrading. 1.6.4 is almost a year and half old. Software has a shelf life, too 😉

  • #10 / Oct 30, 2009 11:52am

    shellfish

    48 posts

    Yes, it did work for me at first but then a site visitor said it wasn’t working and now it isn’t working for me either - very odd

  • #11 / Oct 30, 2009 12:07pm

    Ingmar

    29245 posts

    I just sent a test message: I got a success message, which means that EE has successfully handed the mail off to the server, which has accepted it for delivery. Do you have access to your mail server’s logs? Or can you ask your host about it? It sounds like a potential issue with your mail server setup.

  • #12 / Oct 30, 2009 12:12pm

    shellfish

    48 posts

    Ok cool - will give my hosting company a call.

    Thanks for your help

    Shelley

  • #13 / Oct 30, 2009 12:25pm

    Ingmar

    29245 posts

    I see my test message did get through… so, EE seems to be working. Perhaps obvious, but have you checked spam folders and such? Let us know how you get on…

  • #14 / Nov 03, 2009 4:15pm

    shellfish

    48 posts

    Hey,

    Finally got the following info from the hosting company regarding my form posting issue.

    FAQs
    Search FAQs :   Advanced Search >>
    Back
    PHP Sendmail Help
    
    PHP send mail scripts - Update. Possibly one of the most popular ways to send a form submission is the use of the PHP mail function. Due to a recent server update customers who choose to use this method will need to include an extra variable in their code.
    
    What needs to be included is;
    
    1. A variable that tells the script where the email is being sent from; For example; $SendEmail ="[email protected]";
    2. Adding this variable onto the end of the mail() function. Below is a very basic php script, I have included the extra entries in italic.
    
    $nameField = $_POST['name'];
    $emailField = $_POST['email'];
    $SendEmail ="[email protected]";
    $body = <<< EOD
    
    Name: $nameField
    Email: $emailField
    EOD;
    
    $headers = "From: $emailField\r\n";
    $headers .= "Content-type: text/html\r\n";
    $sucess = mail($webMaster, $emailSubject, $headers, $body, '-f'.$SendEmail);
    
    The important part here is the '-f'.$SendEmail at the end of the mail() function. The '-f' although not a php command is a sendmail parameter that is telling our mailserver the mail is being sent from the $SendEmail address and nowhere else.

    Can anyone advise me on whether I can add a parameter that does this to the existing EE contact form tag or should I re-code the forms in PHP?

    Thanks

    Shelley

  • #15 / Nov 03, 2009 4:25pm

    Ingmar

    29245 posts

    What email protocol are you using? Sendmail? PHP Mail? Also, you probably should upgrade to the latest version and build, there were q few email related changes if I recall.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases