Password reset email not being sent

Not all emails are being sent out from our site. For example, password reset gives following error message: "The e-mail could not be sent. Possible reason: your host may have disabled the mail() function." Problem temporarily resolved yesterday after Host found MOD_security to be blocking something. Problem occurring again today but Host says emails are not being blocked. Specifically they said "sendmail from ssh works, so it's probably something with the Wordpress".

I have tried Contact Form, plugin from WPMU DEV (adds a contact form widget to the site) but nothing happens when I click on "Send Message".

I have tried using Postman SMTP but it says "timed out" when trying to send a test email.

The problem with emails (password reset and new user notifications to Admin) is happening on both pci-learning and pci-learning.com/performanceconsultants (temporary URL until we update DNS records to point performanceconsultants.com domain to Bluehost). The two sites are completely separate Wordpress installations, using different plugins, but both are hosted on Bluehost.

It is really urgent that we resolve this problem, in a permanent way!, so that we can launch our newly built www,performanceconsultants.com website.

I tried to grant support access to pci-learning.com/performanceconsultants but it states that this is not available for this site, despite my having visited https://premium.wpmudev.org/wp-admin/profile.php and disabled pci-learning.com and enabled pci-learning.com/performanceconsultants.com.

I really hope you can help!!! Thank you

(By the way, even though I have the 'Notify me by Email' checked, I never receive the notifications)

  • Michelle Shull

    Hi there, PCI Team!

    You're on the right track by trying to switch to SMTP, it sounds like you're running out of allotted memory when it's trying to send, however. We can fix that.

    First off, try one of these two SMTP plugins we recommend (they work great for most of the members we recommend it to.)
    https://wordpress.org/plugins/wp-mail-smtp/
    https://wordpress.org/plugins/easy-wp-smtp/

    Pick on or the other, and only one SMTP plugin active on your site at a time.

    Now, if these plugins also cause you to time out, we can do a few tricks to increase your memory limit.

    In wp.config, edit the existing memory limit or add this line:
    define('WP_MEMORY_LIMIT', '128M');

    If you can access the php.ini file on your server, you can edit the PHP memory limit by changing this line:
    memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

    If you can not access this file, you can try adding this line to your .htaccess file:
    php_value memory_limit 128M

    If none of these work, you'll need to speak with your host again to see if they've imposed a memory limit for your site.

    Thanks!

  • Jude

    Howdy @PCI Team

    Just chipping in here to help you solve this efficiently. Most sites worth their salt don't trust a shared hosts IP to send out mail. You need a DKIM if its something serious ( your site suggests it is)

    https://www.emailonacid.com/blog/article/email-development/what_is_dkim_everything_you_need_to_know_about_digital_signatures

    What you really need is ( not email on acid! ) but a reliable and trackable way of sending outgoing mail. Why not try something like

    http://www.mandrill.com/pricing/

    Its free unless you send volumes in excess of 12K / month and you relieved of the stress of users getting frustrated because of crappy mx servers

    Jude

  • PCI Team

    Hi all

    Many thanks indeed for your speedy responses to try to help resolve this. I didn't have php.ini so I created a single php.ini 5.4.

    On Bluehost, they have a page to do with increasing memory https://my.bluehost.com/cgi/help/557 which suggests that after increasing memory in php.ini I should also open the file wp-settings.php. "Near the top of this file look for:

    define('WP_MEMORY_LIMIT', '32M');

    Update this value to the new memory limit as well. Save changes to the file. Once the file is saved, the effect should be immediate."

    However, I only found the following in the file:
    // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
    wp_initial_constants();

    Do I need to edit this file and, if so, how?

    Then Bluehost instructions say:

    "To check and see that the memory_limit has been updated properly, view info.php in a browser. The PHP settings including the memory_limit should have changed. This will also show the path to the php.ini file which is being used."

    It says memory_limit 128M, so memory should now be OK?

    One thing I noticed is that 'Build Date' says Apr 17 2015 17:14:55 which happens to be the date I believe our site pci-learning was hacked. Is this just a coincidence?

    I tried Easy WP SMTP but it didn't work (I've tried it in the past without success). So I reactivated Postman SMTP because I prefer it. It also failed: "Connection timed out". In fact for this and the Password reset request, all that has happened since increasing the memory is the time before error message has increased.

    We already use Microsoft Office 365 for our company emails, so I'd really like to get SMTP working via their server rather than have to use something like Mandrill, excellent as it may be.

    So, I thought I'd test the plugins. I deactivated them all and activated Membership 2 Pro first. (By the way, while deactivated it showed that an update was available. I clicked for the automatic update and irritatingly it installed Membership 2 version 4.0something (ie the non-premium plugin). So, I had to delete that and then install Membership 2 Pro version 1.0.0.7 before I could get it all working again!!!).

    With just Membership 2 Pro working, the Password reset email was sent and received. I tested a few membership things: signing up a new member, and subscribing to and cancelling a membership level. No emails received. So then I installed WPMU DEV Dashboard and WP Mail Logging. Password reset email still working. Then I tried subscribing to and cancelling a membership level. According to WP Mail Logging, the two emails were sent but I haven't received them.

    In case it helps, the diagnostic test in Postman with only 4 plugins activated is as follows:

    OS: Linux box911.bluehost.com 3.12.35.1418868052 #1 SMP Wed Dec 17 20:04:02 CST 2014 x86_64
    HTTP User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
    Platform: PHP Linux 5.4.40 / WordPress 4.2.2 en_GB
    PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=Yes, mcrypt=Yes
    WordPress Theme: PCI Theme
    WordPress Plugins: Membership 2 Pro, Postman SMTP, WP Mail Logging, WPMU DEV Dashboard
    Postman Version: 1.6.23
    Postman Sender Domain (Envelope|Message): performanceconsultants.com|performanceconsultants.com
    Postman Prevent Message Sender Override (Email|Name): Yes|Yes
    Postman Transport URI: smtp:tls:login://smtp.office365.com:587
    Postman Transport Status (Configured|Ready|Connected): Yes|Yes|No
    Postman Deliveries (Success|Fail): 0|28
    Postman Bind (Success|Fail|Path): [EDITED OUT]
    Postman TCP Timeout (Connection|Read): 10|60
    Postman Email Log (Enabled|Limit|Transcript Size): Yes|10|128
    Postman Run Mode: production
    Postman PHP LogLevel: 40000
    Postman Stealth Mode: No
    Postman File Locking (Enabled|Temp Dir): Yes|/tmp

    With Membership, WP Mail Logging, WPMU DEV Dashboard, I reactivated Contact Form (WPMU DEV's contact form widget) and tested the form. Nothing happened after I clicked on "Send Message". I then reactivated Contact Form 7 and got the following error message after clicking on "Send": "Failed to send your message. Please try later or contact the administrator by another method." WP Mail Logging logs the Contact Form 7 enquiry message has having been sent.

    As a last resort, I tried switching theme to Twenty Thirteen but no improvement (we use a child of Discovery). So, I have reactivated all the plugins we were using before.

    I really hope that someone might be able to help by accessing our site, so I have granted Support Staff Access to http://www.pci-learning.com/performanceconsultants/.

    Thank you!!!

  • PCI Team

    Just thought I'd test WP Easy SMTP again but it failed and the message did not even appear in WP Mail Log. So, I installed WP Mail SMTP, just to cover all bases. It also failed and provided a very long debugging output but not sure how much of that is safe to copy here. Interestingly, the test message from WP Mail SMTP did appear in WP Mail Log. Don't know why one would appear and not the other.

    And a specific query to Jude: how do you use Mandrill? I created an account as a last resort. It shows their SMTP details smtp.mandrillapp.com etc and an API key. Do I enter this into something like WP MAil SMTP (if so, it doesn't specify which type of encryption)? If that is the case, I don't see why it would be better than smtp.office365.com.

    Many thanks

  • PCI Team

    Hi again

    I made a tiny bit of progress with WP Mail SMTP on Addon domain pci-learning/performanceconsultants. Instead of "Send all WordPress emails via SMTP" I swapped to "Use the PHP mail() function to send emails", left "Set the return-path to match the From Email" unchecked, and then sent a test message. The message was sent and received successfully. It also got the Password reset working (confirmation email was received)!!!

    I got really excited and installed it on the main domain pci-learning.com. I set it to use PHP but I checked "Set the return-path to match the From Email" (because in this case I wanted them to reply to the from address). It didn't work. So I unchecked the latter and test email was successful, although the test email was received from pcilearn@box911.bluehost instead of the From email I had specified. Then I left the From email blank because we use Ultimate Branding to set the From email. Message still received from pcilearn@ but at least it was received! So I tested the Password reset on pci-learning and got the old error:

    The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function.

    So I went back to pci-learning/performanceconsultants to test emails and it was no longer working. WP Mail SMTP test email (using PHP) and password reset email are logged as sent but nothing received. And the error message showing after requesting the password reset:

    The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function.

    The only thing I did in between password reset working and it not working, other than try it out on pci-learning, was to test Contact Form 7 and Contact Form (WPMU DEV widget). Test emails from both were logged but nothing received. So I deactivated both plugins, just to see, but Password reset error still occurring.

    Oh dear!

    Thanks Frances

  • PCI Team

    Latest:

    Having left both Contact plugins deactivated over night, today things started a bit better:

    http://www.pci-learning.com/performanceconsultants/wp-login.php?action=lostpassword
    The Password reset email is being sent and received immediately
    and
    The 'Create new user' email from Automessage plugin is being sent and received after 25 mins
    but
    New user notification email not received by Admin (and not logged as sent by WP Mail Logging Log)

    I have just activated Contact plugin and added the Contact Form widget. Hey presto Password reset error reappeared. Deactivating Contact doesn't solve the problem but perhaps after a period of time it will.

    However, on the main site which doesn't use Contact plugin, the Password error is still there:

    http://pci-learning.com/wp-login.php?action=lostpassword
    Error message: "The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function."

  • PCI Team

    Left Contact Form (WPMU DEV plugin) deactivated on http://www.pci-learning.com/performanceconsultants/ and after approx 10 mins the Password reset started working again.

    Reactivated Contact Form 7 (Takayuki Miyoshi plugin) and Password reset is still working. The message sent via the Contact Form 7 form was logged as sent by WP Mail Logging Log but generated the following error below the form:

    Failed to send your message. Please try later or contact the administrator by another method.

    The message has not been received.

    Other than identifying Contact Form (WPMU DEV plugin) as the likely conflict with the Password reset emails, I don't feel any closer to finally resolving this serious problem on our site.

    Would anyone like to help?

  • Michelle Shull

    Hi there, PCI!

    Okay, if I'm reading correctly, you've determined the following:

    Sending emails breaks with our Contact widget enabled alongside Contact Form 7, correct?

    I think this may be the key to the kingdom here, I bet the conflict is actually between those two plugins, and we're seeing bleedover into the rest of WordPress. To the best of my knowledge, you can do a widget with Contact Form 7, using a shortcode in a text widget, so we can replace the behaviour you needed our Contact Widget to do, and leave it deactivated. Is this a solution that works for you while we sort out why the conflict is occurring? (Sometimes conflicts between plugins that do the same or similar things, or have the same or similar names for classes/functions/shortcodes/etc are inevitable, and there's not much we can do other than help find a work around.)

    As for your Membership issue, be sure to always update Membership 2 from the WPMU DEV dashboard, rather than through the default WP update page.

    Thanks for the fantastic troubleshooting here, you get a merit badge for thoroughness. :slight_smile:

  • PCI Team

    Hello Michelle

    Many thanks for responding, and for tips on creating a Contact Form 7 form with text widget. We've done that but it's not working (error message appears after submitting form). And I'm not certain that it is just Contact causing the outbound email break as last week the Password reset error was occuring even with Contact deactivated. So, I'm testing the plugins again.

    I'm just going through our SQL databases and noticed in wp_options the following options:

    13
    mailserver_url
    mail.example.com

    14
    mailserver_login
    login@example.com

    15
    mailserver_pass
    password

    16
    mailserver_port
    110

    Should "mail.example.com", "login@example.com" and "password" be real addresses and password? Currently they are exactly as written here. I'm wondering if I can replace them and the port number with our SMTP values?

    Many thanks

    Frances

  • PCI Team

    I have copied the entire site to another host to check once and for all if it's a Bluehost sending issue. The Password reset error message appeared when I had WP-Mail-SMTP activated and set to send via SMTP (although WP Mail Logging Log shows the reset email to have been sent). However, password reset started when I changed to send via php. So I deactivated this plugin. So, when not trying to use SMTP, the problem does look like a Bluehost issue. I will follow up with them again!!!

    Thanks for you help.

  • PCI Team

    To conclude this long post on a positive note ... the Password reset error and email sending problem on both pci-learning and pci-learning.com/performanceconsultants turned out to be related only to @performanceconsultants.com addresses. Because the domain http://www.performanceconsultants.com isn’t registered with Bluehost, emails sent to @performanceconsultants.com weren’t being delivered. So, all email sending from pci-learning.com/performanceconsultants had to be routed remotely not locally. And until that change was made, not even an SMTP plugin could help. (Or perhaps SMTP plugins only work if emails are routed remotely? If so, I wish someone had told me!)

    Prior to creating the addon site (pci-learning.com/performanceconsultants.com), emails to @performanceconsultants.com had worked fine from the main pci-learning.com site, with email routing set to local. So, the fact that email routing for the addon site was also local hadn't worried me. As soon as email routing on pci-learning.com/performanceconsultants.com was set to remote, emails to @performanceconsultants.com from both sites started working immediately (pci-learning still set to local).

    So obvious now but, despite me explaining each time that the problem started for both sites when the addon site was created and that the addon site domain name was registered elsewhere, it took 6 different Bluehost technicians before someone spotted it!

    So, having finally resolved the emailing problem, the new site is now live at http://www.performanceconsultants.com, on the new host Bluehost. Hooray!

    Thanks again for trying to help

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.