How to Solve WordPress Not Sending Emails Issue

How to Solve WordPress Not Sending Emails Issue

How to Solve WordPress Not Sending Emails Issue

WordPress not sending emails is one of the most common issue faced by WordPress users. You may have noticed that you are not getting email notifications as expected, or your readers or customers have complained the same.

Also, you may have correctly installed a contact plugin like Contact Form 7, but then observed that emails are not getting sent from this source.

Email problems like this can be quite frustrating, but the good news is, with 30 minutes of work, you would be able to fix this issue and have WordPress sending out emails without problems.

In This Article:

  1. What causes the WordPress Not Sending Emails Issue?
  2. How to Solve.

Install and configure Gmail SMTP plugin.

  1. Testing your Gmail SMTP plugin.
  2. How to fix SMTP Plugin not connecting to Gmail Server.

What Causes the WordPress Not Sending Emails Issue?

One major reason why this happens is that webhosts disable the PHP Mail function because it is very easy to exploit by spammers and hackers.

When WordPress wants to send emails, it calls on the email server in your webhost using the PHP Mail function, but if this function is disabled by your webhost (which is often the case), your requests to send emails will not even get to your mail server.

Even if this function is not disabled by your webhost, it is generally known that email servers screen out emails sent using PHP Mail function. And so, your emails may get sent but will not be received by the recipient server; and even if they are received, would very often land in spam.

But how can you fix all these issues?

How To Solve

Note: If you do not want to go through the stress of resolving this issue, our developers can do it for you in a few minutes. Simply request our service here.

The WordPress not sending emails issue can be solved by installing an SMTP Server Plugin.

When you have an SMTP server correctly installed, WordPress would no longer need to send emails using your webhost email server. Instead, the emails would go directly from WordPress to your SMTP server, thus removing the problem.

Additionally, since SMTP uses the PHP Mailer Library instead of the PHP Mail function, your emails are much more likely to be correctly delivered and to avoid the spam folder.

Install and Configure Gmail SMTP Plugin

To use Gmail SMTP, you would need a Gmail account. Using a free Gmail account, note that you would have a daily limit of 500 emails (which gives you 15,000 emails per month). This should be ok for most regular users.

If you require more emails, you can increase your email allowance to 2000 per day by signing up for a paid Google Apps for Work account.

Installing Gmail SMTP Plugin

To install the plugin, login to your WordPress dashboard and go to Plugins > Add New.

WordPress not sending emails - Install plugin

In the search box, enter “gmail smtp” and when this plugin appears, click Install Now.

Install Gmail SMTP - WordPress not sending emails

When the installation completes, click Activate.

You would be taken to the “Plugins” page with a message on top indicating your plugin has been activated. On this page, search for the Gmail SMTP plugin and click Settings.

 Gmail SMTP plugin settings

Authorizing The Plugin To Send Using Your Gmail Account

At this point, you need to authorize your SMTP plugin to send emails using your Gmail account. For this to work, you have to create a google web application and generate API keys. This sounds technical, but it is actually quite easy and straightforward.

Go to the Google App creation page, and login with the google account you intend to use.

On the “Register your application” page, select “Yes” for both items and click Agree and Continue.

Agree to Google terms

On the next page, click Go to credentials.

Go to credentials - Fix WordPress not sending emails

On the “Add credentials” page, leave the API set to “Gmail API”, select “Web browser (Javascript)” as the place you would be calling the API from, and select “User data” as the kind of data you would be accessing. Next, click What credentials do I need?

Set credential type - Fix WordPress not sending emails

In the next page, enter a name for your authorization client and enter your blog URL in the “Authorized Javascript origins” input box.

Your “Authorized Redirect URI” is provided in your Gmail SMTP plugin page. Go there and copy it. Make sure you copy the whole link.

Redirect URI - Fix WordPress not sending emails

Paste this redirect URI in your Gmail credential page, and click Create Client ID.

Create client ID - Fix WordPress not sending emails

In the next step, leave the email address set to the one you want to use, and enter a product name. You can use any product name you choose, e.g. “Gmail SMTP Sender”. Next, click Continue.

Set Oauth - Fix WordPress not sending emails

In the final step, click Done.

Finish credential creation - Fix WordPress not sending emails

You will be taken to the credentials page. Click on the name of the credential you just created.

Open credential

In the next page, you will see your Client ID and Client Secret.

Copy Credential Info - Fix WordPress not sending emails

Copy the “Client ID” and “Client Secret” into their corresponding input boxes in the Gmail SMTP plugin settings page.

Next, enter the Gmail address you are using in the “OAuth Email Address” and “From Email Address” Input boxes.

Enter your “From Name”, which is the name that would show when a person receives your message.

In “Type of Encryption”, select TLS, and enter 587 in the “SMTP Port” input box.

If you do not use an SSL certificate on your server, tick the “Disable SSL Certificate Verification” box. We however strongly recommend you use SSL on all your sites and leave this option as is.

Click Save Changes.

Complete plugin setup - Fix WordPress not sending emails

After the settings have been saved, a “Grant Permission” button would appear. Click on it.

Grant permission - Fix WordPress not sending emails

Note: If you receive a message warning you that the app has not been verified, click Advanced and click the Go to (url) link.

In the authorization page, click Allow.

Allow permissions

You would be taken back to your plugin setting page where you should see an “Access Granted Successfully” message at the top. Also, SMTP Status should now be “Connected”.

Connected to Gmail - Fix WordPress not sending emails

And that’s it! You have configured WordPress to send emails using Gmail SMTP.

Testing Your Gmail SMTP Plugin

At this point, you want to send a test email to see if it works.

To do this, switch to the “Test Email” tab in your plugin. Next, fill out the “To”, “Subject”, and “Message” fields and click Send Email.

Send test email - Fix WordPress not sending emails

If you have followed the steps carefully, you should receive the test email in your inbox, in which case your WordPress not sending emails issue is resolved!

How to fix SMTP Plugin not connecting to Gmail Server

If you correctly followed the steps to connect SMTP plugin to Gmail, and yet your test email failed, the most common reason is that the connection port (587) is disabled by your web host. Read here to learn how to fix this.

Conclusion

At this point, you should have successfully resolved the WordPress not sending emails issue in your site. If you are still having challenges, we can help you resolve it.

Also, if you have questions or suggestions, please drop them in the comments section below.