Post SMTP Mailer
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
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
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 :)”
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