How to fix WordPress not sending email issue?

wordpress email not sending issue

WordPress not sending emails? This article will show how to fix WordPress’s 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’s not sending email issue by using a free plugin.

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

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

In 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 the WordPress not sending email issue.

Table of Content

Post SMTP Mailer

Image2020 03 25at10 12 42PM d154cff48dc4377aa6ea3562aa0bdc2d 800

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

The plugin has four built-in vendor-specific options. Which skips all the hard parts 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
Image2020 03 25at10 13 22PM 1bf4025bf914df6c39ec1060511a9cf0 800

How to fix WordPress not sending email issue with Gmail?

First part of this section is set up 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
Image2020 03 26at12 15 35AM a08694efed6a0fe4381adf7f70c85128 800

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.
Image2020 03 25at10 39 35PM 2eaf7fe92b9afdf4bed37b3b66f6c036 800
  • Click Continue when the screen below appears.
Image2020 03 25at10 52 07PM b13551cc1f3eec0510072ef568391c4f 800
  • You will then see that The API is enabled.
  • Click on Go to credentials button
Image2020 03 25at10 52 57PM adffd7fcb43843ff002d79987dd7c549 800
  • You will land on the following screen.
  • Click client ID
Image2020 03 25at10 57 21PM e6ffa313acb69500efeddb1a40da45bc 800
  • You will then be prompted to Configure Consent Screen. Click on the button
Image2020 03 25at10 58 54PM 1768e2c1d694c3b0f3ac612c40bf8da7 800
  • You maybe prompted at the following screen.
  • Do NOT select any options just click CREATE
Image2020 03 25at11 02 58PM c68ee4c27df42d49d87e81fe2d17633c 800
  • Choose an Application name
  • Make sure your correct email is selected
  • Hit Save
Image2020 03 25at11 13 01PM 6c46d0eaa8b42976ff556b892e806f45 800
  • Then click on Credentials on the left hand pane
  • Click +Create Crentials
  • The click on OAuth client ID
Image2020 03 25at11 18 22PM 7031ca0e012d54abf17d902102e43a1b 800
  • 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
Image2020 03 25at11 33 19PM 341caa00a81d5c7d11d91ff44af673ca 800
  • You will be given both Your Client ID and Client Secret.
  • I have blurred it in image below.
Image2020 03 25at11 39 00PM ecbe1d23e776ce9d6861fa9683e8c2f6 800
  • Head back to WordPress dashboard
  • Click Post SMTP > then Account
  • Enter both Client ID and Client Secret
  • Click Save Changes
Image2020 03 25at11 41 49PM 3bb3f5e443deaa6489c0341ffaef0258 800
  • We need to grant permissions with Google. There are two places you will see the message. For some reason, one comes up as disabled.
Image2020 03 25at11 47 32PM 396f587f30cd87d5b064d4d084800c2a 800
  • 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)
Image2020 03 25at11 51 03PM e854d197adbfbd980825f6be5da8080d 800
  • 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
Image2020 03 25at11 53 47PM cbde8b9b5347778c2edbc74fcf38de29 800
  • 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
Image2020 03 31at12 10 17AM 7fce8f19b690c87ddd4156c6e7222bfb 800
617155ca69d8a815574020
Share on facebook
Facebook
Share on linkedin
LinkedIn
Share on twitter
Twitter

Subscribe to updates

Leave a Reply

Your email address will not be published.

Blazing fast WordPress hosting by Kinsta