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.

Email module's contact form does not sent emails

December 02, 2011 5:35am

Subscribe [5]
  • #1 / Dec 02, 2011 5:35am

    Laisvunas

    879 posts

    Hi,

    I have problem with Email module’s contact form.

    I tried to use the code from example in docs (changed only parameter “recipients” value):

    {exp:email:contact_form user_recipients="no" recipients="[email protected]" charset="utf-8"}
            <h2>Support Form</h2>
    <p>        <br />
                    <label for="from">Your Email:</label></p>
    
    <p>                <input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" /><br />
            <br />
            <br />
                    <label for="subject">Subject:</label></p>
    
    <p>                <input type="text" id="subject" name="subject" size="40" value="Contact Form" /><br />
            <br />
            <br />
                    <label for="message">Message:</label></p>
    
    <p>                <textarea id="message" name="message" rows="18" cols="40"><br />
                            Support Email from: {member_name}<br />
                            Sent at:  {current_time format="%Y %m %d"}<br />
                    </textarea><br />
            <br />
            <br />
                    <input name="submit" type='submit' value='Submit Form' /><br />
            <br />
    {/exp:email:contact_form}

    Unfortunately, this code does not work. After submitting form I see message “Your email has been sent”, but in reality the email does not get sent.

    What should be done to get contact form working?

    I use EE v2.3.1

  • #2 / Dec 02, 2011 8:41am

    Neil Evans

    1403 posts

    it is more likely that the email is being sent, but that it is being blocked and bounced by SPAM or filters at the other end. I am seeing this more and more frequently.

    Test with a number of different accounts, hotmail, yahoo, gmail, personal… etc. All the same results?

    If not in settings in the control panel look to send an email through a different method, SMTP and a real account for example.
    N

  • #3 / Dec 03, 2011 5:59am

    Laisvunas

    879 posts

    Hi nevsie,

    Thanks for the suggestion.

    I tried with several email accounts and I checked in spam folders. The result is the same - although “Your email message has been sent” gets displayed, no email gets sent.

    I also tried the same code in EE v1.7.1 and there it works pefectly.

    Maybe there is a bug in Email module in EE2.3.1?

  • #4 / Dec 04, 2011 7:04am

    Sean C. Smith

    3818 posts

    Laisvunas,

    Are you able to send and receive a message via the EE communicate page located at Tools > Communicate? Have you tried using the different settings for mail: php mail, sendmail and smtp? You can find that at Admin > Email Configuration.

    Sean

  • #5 / Dec 04, 2011 11:29am

    Laisvunas

    879 posts

    Hi Sean,

    I tried PHP Mail and Sendmail, but neither via the EE communicate page.

    What causes PHP Mail and Sendmail not working? What should be done to get at least one of these protocols working?

  • #6 / Dec 06, 2011 4:52am

    Laisvunas

    879 posts

    Hi Tech Support,

    Where you are? Any ideas on this problem?

  • #7 / Dec 06, 2011 5:46pm

    Kevin Smith

    4784 posts

    Hi Laisvunas,

    Troubleshooting a site’s ability to send email can be very difficult because we need to determine whether it’s the application, the server, the email server sending the email, or the email server receiving the email that’s causing the problem. Let’s do a quick test that takes EE out of the equation completely.

    Look in your system folder for /system/expressionengine/utilities/email_test.php

    Take that file and copy it to your web root. Now access that file directly. It’s a self-contained file, and it has no association with EE. If you’re able to send emails through this file but not through EE, we know the problem lies with EE. Otherwise, we know the problem lies somewhere else in the server or email server setup.

    Let us know the results!

  • #8 / Feb 08, 2012 2:42pm

    crzycode

    50 posts

    I’m having the same issue as this poster (using v2.3.1 as well).  I’m using mamp pro.  Doing the above test gives me the following message but I do not receive the email (checked spam folder and all):

    Email Test Script

    No PHP errors were encountered, which indicates that PHP correctly attempted to send your email message.

    If you do not receive the email it could be due to one of the following problems:

    Your hosting provider might not permit email to be sent using PHP mail
    The path to Sendmail is incorrect in your server’s PHP ini file
    Your server does not have Sendmail configured correctly.
    The recipient’s email server has spam blocking software which is incorrectly identifying messages send using PHP as spam

  • #9 / Feb 12, 2012 9:21am

    Sean C. Smith

    3818 posts

    Hi crzycode,

    Have you checked the mamp settings to confirm that everything is okay with regards to the message you are getting:

    If you do not receive the email it could be due to one of the following problems:

    Your hosting provider might not permit email to be sent using PHP mail
    The path to Sendmail is incorrect in your server’s PHP ini file
    Your server does not have Sendmail configured correctly.
    The recipient’s email server has spam blocking software which is incorrectly identifying messages send using PHP as spam

    Sean

  • #10 / Feb 14, 2012 5:59pm

    ROCKET MEDIA

    153 posts

    I too, am having this error—if you’d be so kind as to post your solution when you find one, I’d be grateful, thanks!

  • #11 / Feb 16, 2012 5:20pm

    Shane Eckert

    7174 posts

    ROCKET MEDIA, and crzycode,

    Can you check on these troubleshooting items?

    Is the path to Sendmail correct in your PHP ini file?

    Does your server have Sendmail configured correctly?

    Try this:

    echo "Subject: test" | /usr/lib/sendmail -v .(JavaScript must be enabled to view this email address)

    Can you send email using PHP mail?

    To test this, just write a simple little script to send mail using mail().

    Let me know the results of these tests.

    Thanks guys!

    Cheers,

     

  • #12 / Feb 17, 2012 11:17am

    ROCKET MEDIA

    153 posts

    Using SMTP solved my problem. I am running on Rackspace Cloud, and their support says this is the best way to go. They stated that the reason the other settings may not work, is that they are more public, especially the php mail() function which, on their servers, is simply thrown into a queue with all other cloud requests. This makes for sending email incredibly slow with a high failure rate. After switching to SMTP, emails sent immediately and without any problems.

  • #13 / Feb 20, 2012 4:42pm

    Shane Eckert

    7174 posts

    Hey ROCKET MEDIA,

    That’s great. SMTP is a nicer solution.

    Thank you for the details on RS - it’s really good to know this for future reference and I am sure the community will benefit from this info as well.

    crzycode and Laisvunas - any updates?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases