Wordpress Hacks | Email Issue — No more with Gmail API

This is a topic created from the demand of the public need, as my clients website are facing issue that they are not able to recieve email from their WORDPRESS CONTACT FORM 7!

This document is for people who want to fix their contact form receiving email issue.

Pre-requisite before reading down the document:

  • The website is done using Wordpress
  • We are using Contact Form 7 to send out emails
  • Having a GMAIL account to access to GOOGLE API
  • Need to download a Wordpress Plugin WP Mail SMTP (click here to download) from WPForms

After installing WP Mail SMTP, you will need to setup the Gmail features to enable Google API to help you blast out your email from CF7.

Selecting Google as the Mailer

Next is you have to fill up these 2 texbox which is the Client ID and Client Secret.

Fillng up these 2 item will require you to enable your Google Mail Secret Key

Step 2: Setting up your Web App in your Google Account

To create a new Web App — you will need to login to Google Developer Console.

First Create A Project if you have not created one.

then you go to Library to enable the necessary API.

Select Google API, and click Enable

Select this
Click enable

Once enabled, click on credential

Go to Credential

Provide the details as per IMAGE

  • Which API are you using? For our setup, we’ll be using the Gmail API.
  • Where will you be calling the API from? The application will be calling Google’s API from a web server (e.g. node.js, Tomcat).
  • What data will you be accessing? The connection will be accessing User data.

Once done, you will need to create your OAuth.

In the OAuth screen, select external as you are not a GSUITE USER.

Select External if you are NOT a GSUITE account, and Select Internal if you are using GSUITE.

Once you done, entered the App domain and the Authorized Domains.

Example.com is a reference — please place your own website URL base on the requirement

Next Enabling the scope of services. (ALL SCOPES)

Once you done providing the access your last step is to Add credential to Your Project.

Use this URL

Name — Give a name that you remembered that this is for your Mailer service

Authorized JavaScript origins — Your website that is using this service.

Authorized redirect URIs — https://connect.wpmailsmtp.com/google/. Copy this value by clicking the copy button next to the field.

Once you done, click on Create OAuth Client ID, and retrieve the Client ID and Secret Key from the account.

Paste them onto the setting, press the SAVE button to update the system with the new ID and SECRET.

Then you finished it off with Save Settings, choose Allow button to proceed.

Once you are done, you can test the email function on the system for a trial.

Leave your Comments below if you have any question or issue regarding this. Please leave a clap if you appreciate my work :) thank you!

Extract taken from https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/

--

--

Digitization Coach | Adrian Soon
Digital Marketing Buzz

I trained business owners how to digitise their businesses, and achieve great result in digital marketing.