How to fix WordPress not sending email issue?

A comprehensive guide to fix WordPress email issue using a free plugin
Share on facebook
Share on twitter
Share on linkedin

WordPress not sending emails? This article will show how to fix WordPress not sending email issue.

You have put some forms on your website. Maybe your customers are not getting emails after a purchase?

This article will show how to fix WordPress not sending email issue by using a free plugin.

Let’s understand the situation first. WordPress uses function called PHP()mail to distribute emails. This does work fine on most of the time.

Due to a few reasons it does stop working. Some server and web hosts restrict those emails to reduce spam emails. This restrictions can be temporary or permanent.

Either case, a website must have a reliable system in place. Therefore, a few free plugins make sure your emails are distributed.

Without further ado, let’s fix WordPress not sending email issue.

Post SMTP Mailer

This is a completely free plugin. There are few features that separate it from other similar plugins.

The plugin has four builtin vendor specific options. Which skips all the hard part and all you need is the API keys.

In this article we will look into setting up Gmail API.

Install Post SMTP Mailer

Head to WordPress plugin repository, search, install and activate the plugin. Follow these steps.

  • Go to WordPress dashbaord
  • Click Plugins > Add New > Search Post SMTP
  • Install and activate Post SMTP Mailer/Email Log

How to fix WordPress not sending email issue with Gmail?

First part of this section is setup Post SMTP to distribute emails via Google API. Follow these steps. We will not be following the Setup Wizard.

Setup Post SMTP for Gmail

  • Click ‘Show all settings’ under Star the Wizard button.
  • Type > Gmail API
  • Mailer type > PostSMTP
  • You will be needing the URIs on the settings page later
  • Click Save Changes

Get Google Client ID and Secret

The Gmail API is free, all you need is a free gmail account. Follow these steps to get the Id and Secret.

  • Go to Google API Console and login with gmail if prompted.
  • Agree to terms and conditions if it is your first time.
  • Click Continue when the screen below appears.
  • You will then see that The API is enabled.
  • Click on Go to credentials button
  • You will land on the following screen.
  • Click client ID
  • You will then be prompted to Configure Consent Screen. Click on the button
  • You maybe prompted at the following screen.
  • Do NOT select any options just click CREATE
  • Choose an Application name
  • Make sure your correct email is selected
  • Hit Save
  • Then click on Credentials on the left hand pane
  • Click +Create Crentials
  • The click on OAuth client ID
  • Select Web application under Application type
  • Enter a name
  • Click on + ADD URIs
  • Enter the URL that was give during Post SMTP setup
  • Under Authorised redirect URIs, enter the second address provided in Post SMTP
  • Click Create
  • You will be given both Your Client ID and Client Secret.
  • I have blurred it in image below.
  • Head back to WordPress dashboard
  • Click Post SMTP > then Account
  • Enter both Client ID and Client Secret
  • Click Save Changes
  • We need to grant permissions with Google. There are two places you will see the message. For some reason, one comes up as disabled.
  • It will then open Google Authentication Page
  • Sign in with the email you just setup
  • You maybe prompted by Google saying this App is not verified. This is connecting to your website – see the address at the bottom.
  • Click Advanced
  • Click Go to yourwebsite.co.nz (unsafe)
  • The app will ask for some permission to be able to read, send and delete emails on your behalf.
  • Click Allow
  • Then it will redirect back to your website
  • Click on Send a test email
  • Enter details and click send.
  • It will return with a message that “Your message was delivered (1389 ms) to the SMTP server! Congratulations :)”

Message Settings

Make sure you update the Message settings as well.

  • Go to Post SMTP
  • Click Show All Settings under the blue button
  • Go to Message
  • Update the details accordingly

Share on facebook
Facebook
Share on linkedin
LinkedIn
Share on twitter
Twitter

Subscribe to updates

Leave a Comment

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

Scroll to Top