How to Fix WordPress Mail

Share Button

You’ve set up your WordPress site, there’s just one issue. You can’t send mail. This means your contact forms don’t work, new user emails don’t work, password reset requests can’t be sent. It’s not a good situation. The good news is, there’s a pretty simple fix.

Originally published Oct 14, 2014. Updated October 20, 2017.

Signs WordPress Email Function is Broken

These are some common error messages when the standard WordPress mail isn’t working:

  • WordPress Password Reset: “The e-mail could not be sent. Possible reason: your host may have disabled the mail() function.”
  • Contact Form 7: “Failed to send your message. Please try later or contact the administrator by another method.”

If you aren’t seeing any error messages from the site, then your site may be sending emails, you just aren’t receiving them. In this case, then you are likely having deliverability problems. For those, read the post on  Email Types & How to Actually Get Your Email Delivered.

There are usually two reasons that email is broken:

  • The configuration of your server blocks the PHP mail() function from operating correctly.
  • The email provider that you use doesn’t accept emails from PHP’s mail() function.

The good news is you don’t need to know which problem you have, the fix is the same.


How to Fix Mail So You Can Send Emails Again

First, you need to login to WordPress. If you only have one account and can’t remember the password, then the only way to get in is to reset your password directly in the database. You should contact your developer or hosting provider to have them reset it. If neither of these is an option, click here for instructions for changing this yourself, but use at your own risk.

Now that you are logged in, you need to install the WP Mail SMTP plugin. This plugin will change WordPress from using php’s mail() function to using SMTP protocols.

Once you have installed and activated WP Mail SMTP, you’ll need to go to Settings > Email to configure it.


Basic Settings

Sometimes, you can fix your email simply by installing the plugin and selecting “Use the PHP mail() function to send emails” and checking the “Set the return-path to match the From Email”.


So mark these two items and then scroll down and click on Save Changes. After saving, scroll down to Send a Test Email and enter your email address and then click on Send Test.


If you receive a bool(true) then it worked and you can stop now.


If you received a bool(false), then continue it’s time for more advanced settings.


If you get a green result but still aren’t receiving the email in your inbox, then you probably have deliverability problems. For those, read the post on  Email Types & How to Actually Get Your Email Delivered.

SMTP Settings

Typically if your issue is with your mail provider, then you need to fix it with by setting up WordPress to use SMTP. You will need to use a from address registered with your mail provider. Then configure all of the settings to match those that your mail provider gives you for that email address.

Make sure to mark “Send all WordPress emails via SMTP”. Once you have entered everything as instructed by your mail provider for the from email address you entered, click on Save Changes.


Go down to Send a Test Email and enter an email address and click on Send Test. If you receive bool(true), then you are done. If not, check to make sure that you entered all of your SMTP information exactly as your mail provider gave it to you (it has to be exact).

Setting Contact Form Plugins

If you are using a contact form plug-in (such as the wonderful Contact Form 7), then you will need to set up the From: address in the contact form to be the same email as the From setup in WP Mail SMTP. If the email addresses are not the same, then the contact form will likely have errors.


Having WordPress unable to send email can be a pretty stressful situation, but the good news is that WP Mail SMTP does a great job of fixing the problem.


Share Button

20 thoughts on “How to Fix WordPress Mail

  1. Thanks for the post. I only have one question. Why host providers do this? I was all fine until they decided to a server upgrade. (So much for an upgrade!) So after that no only I lost my database and the backups couldn’t be restored because of some sql problems, I also lost the ability to send emails from WordPress.

    So is it something for them in this to block mail() function?

    1. Shahab, hosting providers vary GREATLY in their quality of service, their technical skills, and their server update quality. Sometimes it’s laziness, lack of money to spend on proper upgrades, or just not really caring about their users.

      I always recommend keeping an offsite backup of your site using something like BackWPup or a service like ManageWP.

  2. Thanks, Gen.

    I was able to find an address using that medthod (, but it looks suspect to me. Sent an email and still haven’t gotten a reply. In either case, it’s super weird to me that WordPress would allow someone not to have email access…while the page clearly leaves an email form to contact the site at, and it appears to go through when you send the feedback. There are literally a “Contact Admin” form. How is it that that is allowed if it doesn’t go anywhere? You’d think WordPress would say that you either have an contact on your page or you don’t. But to have something that literally reads “Contact Admin” and then within that “Comments or questions are welcome.” is really kind of a cruel joke that probably shouldn’t be permitted.

    1. Oaken,

      Addresses at domainsbyproxy are using private registration. Basically, the info listed isn’t their actual address. It’s like using a post office box for your address when you don’t want to list your physical address. The domainsbyproxy will normally spam check and then forward emails that pass to whoever registered the domain.

      WordPress is open source software that people install on their own servers. It’s installed on a vast array of different server types and configurations. If a specific server doesn’t have email turned on that’s not the fault of WordPress. It’s like if you go buy a power drill, the company that made the drill isn’t responsible for how you decide to use it, you are. Same of WordPress, WordPress isn’t responsible for how a site owner chooses to setup a website, the site owner is.

  3. Hello,

    I do not have a WordPress account, but have been trying to sign-up with a site that uses WordPress to comment on their site. However, I’m never sent a confirmation email even though it says it sends it out. When I try the forgotten password function, I get the message you’re talking about. I’ve been trying to contact the site for YEARS, now, but to no response. They are either ignoring me or my emails aren’t even reaching them. I’ve used four or five different email addresses. It guess it’s possible all of them could block incoming mail from the WordPress site.

    Do you have any advice on how to remedy this?

    1. Oaken,

      The website you are trying to contact is unable to send email. That means it can’t send any email, so you should stop trying to contact the site. If you absolutely need to reach the site owners, you should look for alternative contact information such as a direct email address, phone number or other means. You can also put the domain name into and do a lookup to see what information is listed as the website owner and try to email them directly.

    1. Yeah, I’ve dealt with HostGator before. They offer inexpensive hosting. For what you pay you do get decent servers, however, you don’t get any customer support. If you get sick of HostGator and want actual customer support and are willing to pay a couple bucks more a month (because you won’t get support from any company if you don’t pay a little more), check out SiteGround.

    1. Glad I could help!

      I’ve seen an increase in the lack of help from bluehost over the years. They used to be better and have gone downhill a lot.

  4. So so so many thanks..

    It took me whole day to figure out what was going on..
    Finally I did manage to get an error. Did have 1,5 hour chat with host.. nothing.. Realizing that I just the other day signed in for an account with Cloudflare.. Emailing back and forwards.. nothing.

    I was lost and stressed in the meantime.. Oke, I will hit the search button in Google one more time and there was your solotion… Happy now!

  5. Hi,

    I am having this issue, i have used SMTP many times, I have configured the setting correctly, but when ever I send message using ” Send all WordPress emails via SMTP. ” I eget an error but When ever I send test message via ” Use the PHP mail() function to send emails. ” I am able to send mail but I don’t get a response mail to the Email ID I used for testing.

    I can not figure this out, this happened to me first time.

    Can you help?

    1. If the PHP function says email was sent correctly and there are no warnings in the long response then the issue is most likely with the email address receiving — the emails were probably flagged by spam, and depending on how sensitive the spam filter, they may have been completely blocked by the spam filter.

      For the SMTP issue, you’ll need to contact your email provider & hosting company as there are some things that each of those can do which make sending email much harder.

    2. Hi, Thank you for the reply, that is the problem, my domain and hosting is new, this website is running for the first time and all the mail I have sent are sent for testing purpose which hardly may be 5 – 10 mails, and most of them to the test mail id for SMTP.

      That is why I can not figure out what is the problem.

    3. You’ll need to contact your hosting and email provider for assistance with SMTP & PHP mail. There are a lot of settings which can affect how SMTP & PHP mail work, most of these are only under the control of the hosting company. Issues with new hosting are caused by how the hosting company has configured everything — only they can assist you with those issues.

Leave a Reply

Your email address will not be published. Required fields are marked *