Disclaimer: This is a user generated content submitted by a member of the WriteUpCafe Community. The views and writings here reflect that of the author and not of WriteUpCafe. If you have any complaints regarding this post kindly report it to us.

Create credentials

Here comes the best part, we need to create credentials for this Gmail API. Then, click on the button that says Create Credentials on the Credentials tab and a drop-down screen will open, you must select oAuth Client ID.

In the next window, you want to select Web Application in Application Type.

Let's see what to enter in each of these fields.

Name:

You just have to give this a name. You can give any name here. For this tutorial, I just entered Web Client 2.

Authorized JavaScript sources:

You must enter the full address of your website in Authorized JavaScript Sources with https or http: // www on the front. For example, if you have a website called example.com, you must enter https://www.example.com here.

Authorized redirect URI:

And for this authorized redirection URI, we must return to our WordPress panel, configuration -> WP Mail SMTP, search for an authorized redirection URI field and copy the information shown in the screenshot here.

Then come back, right click on the authorized redirection URIs in the Google Developer window above and paste the copied address.

Now that we have done all that.

Let's click on the Create button.

iii) Paste the client ID and client secret in WordPress

Now to configure the OAuth consent screen, you must add the email address that will be used and add the product name that will be displayed to users.

This is usually just for your information. Once we're done with that, let's click Continue.

Once you click Continue, you can see the client ID and the client's secret there. You can copy your client ID and your client secret, return to your WordPress panel -> Settings -> WP Mail SMTP, and paste the client ID and client secret in those corresponding fields.

Now that we are well in regards to customer identification and customer secrecy.

And while copying the Client's secret, be sure to copy only the data and not accidental extra spaces.

iv) Allow the plugin to send emails using your Google account

After saving the WTP GMail SMTP settings, you can scroll down and click on the button that says Allow the plug-in to send emails using your Google account.

Then, once you click, you will see a screen asking you to authorize the website to use your email address. Click on the Allow button on the pop-up screen.

Once you have done that, you will see a successful notification in the WP Mail SMTP configuration that says that the API project is now connected to our website and now everything is configured.

You can even send a test email to make sure everything works correctly.

https://www.keyquery.com

Login

Welcome to WriteUpCafe Community

Join our community to engage with fellow bloggers and increase the visibility of your blog.
Join WriteUpCafe