✨ Up to
-70%
on the 1st year
Days
Hours
Minutes
Seconds

How to configure Gmail as SMTP on WordPress with WPMasterToolKit

Introduction

Gmail is one of the most reliable e-mail services on the market. However, correctly connecting WordPress to Gmail can quickly become complex: creating a Google Cloud project, OAuth, API keys, authorizations...
To simplify this configuration WPMasterToolKit integrates a native Gmail provider in its SMTP Mailerwith a clear, secure approach that's fully integrated with WordPress.

In this article, we will look at step-by-step how to configure Gmail with WPMasterToolKitOur approach is based on official Google logic and on the best practices used by professional SMTP plugins.

Why use Gmail with WPMasterToolKit?

Configuring Gmail as an SMTP sending service allows you to :

  • Guarantee excellent email deliverability
  • Avoid emails blocked or classified as spam
  • Use modern, secure authentication (OAuth)
  • No longer dependent on the PHP function mail() your accommodation

With WPMasterToolKitThis configuration is natively integrated, with no external dependencies.

Discover the module :
Free

Before you start

Before configuring Gmail in WPMasterToolKit, make sure you have :

  • From a Google / Gmail account
  • Access to Google Cloud Console
  • A WordPress site with WPMasterToolKit activated
  • From the PRO version WPMasterToolKit (Gmail provider is a PRO feature)

Create a Web application in your Google Account

You'll need to return to the WPMTK SMTP settings page a little later. To avoid any interruptions, open a new tab or a new window in your browser.

In this tab, connect to your Google Accountthen access the Google Cloud Console.

⚠️ Important before continuing:

  • Log out from all other Google Accounts and keep only the one you'll use for SMTP configuration (to avoid switching between accounts).
  • If you use Google WorkspaceCheck that the selected account is authorized to send e-mails (in particular, it must have an active inbox).

If this is your first connection to Google Cloud ConsoleA window may appear asking you to select your country and accept the terms of use. Complete this step, then click on " AGREE AND CONTINUE " to continue configuration.

If you've already logged in to Google Cloud Console, you can skip the terms of use step.

Creating or selecting a project

Next, you'll need to choose a project for your application. You can either select a existing projector create a new one .

To begin, click on the project selection drop-down menu in the top toolbar of your Google Cloud Console dashboard.

In the pop-up window that appears, select an existing project from the list or click on " ". New Project Click on "New" in the top right-hand corner to create a new one.

If you have selected a existing projectgo directly to the next step.
For a new projectenter a project name "Project name", then select a organization and a location using the drop-down menus.

Then click on the CREATE" .

Enable Gmail API

Next, you need to activate theGmail API for your project.
In the sidebar of the Google Cloud Consolego to APIs & Services > Library.

Then, in the Categoryclick on Google Workspaceor enter "Gmail API in the search bar.

Click on the result Gmail API.

On theGmail APIclick on the blue button "ENABLE.

Create your application logins

Once the Gmail API has been activated, you'll be redirected to the Gmail API overview page.
Then click on the Creating identifiers.

On the next page, Google will ask you a few questions to determine your type of identifiers you need.
In the drop-down menu Select an APIchoose Gmail API.

Then, in the " What data will you be accessing? "select the User data.
Then click on the NEXT to continue.

Configuring the OAuth consent screen

Google will then ask you to fill in some basic information about your application.

This step is primarily intended for personal use, since no one else will be using your application. However, some fields remain mandatory :

  • App name Enter the name of your choice (for example : WordPress App).
  • User support email Select your e-mail address from those suggested.
  • App logo If you wish, you can import a logo for your application. This step is optional.

Finally, add your e-mail address in the field Email addressesthen click on the SAVE AND CONTINUE to move on to the next step.

Authorization configuration (optional)

This step is optional and we're going to go to in this tutorial.
Simply scroll down the page to the bottom of the section Scopesthen click on the SAVE AND CONTINUE to continue.

Note: For more information on Gmail API authorizations (scopes), see the Google developer documentation.

Configuring the OAuth client ID

Next, you'll need to enter some information about your OAuth customer ID.

In the drop-down menu Application typeselect the Web application.
Once this choice has been made, additional fields are automatically displayed.

You can leave the field Name with its default value or change it to something more relevant.

Then ignore the Authorized JavaScript origins and scroll to Authorized redirect URIs.

Return to the WPMTK configuration interface from another tab and retrieve " Authorized Redirect URI " here :

Click on the + ADD A URIthen paste the URL retrieved from the WPMasterToolKit plugin:

Then click on the CREATE to finalize this step.

Once you have created your application, the Your Credentials will unfold and display your Customer ID.
There's no need to copy it yet, as you'll be able to access it from another screen at a later stage.

Instead, simply click on the DONE at the bottom of the page.

Update publication status: from Testing à Production

By default, Google places your application in Internal. It is very important to switch it to External and publish it.
Otherwise, your application will be severely limited and won't work properly.

Select option OAuth consent screen

Then click on the Audience.

The following screen may vary depending on the type of account you are using: a Free Gmail or an account Google Workspace.

Google Workspace users

In the User typeclick on the MAKE EXTERNAL.


In the pop-up window that appears, select the option In productionthen click on Confirm.

Gmail users

If you don't use Google Workspacebutton, you won't see the MAKE EXTERNAL.
Instead, you'll need to publish your Google application.

In the Publishing statusthe application status is set to Testing.
Click on the PUBLISH APP to update the status of your application.

In the window that appears, click on CONFIRM to publish your application.

Once confirmed, you will see that the Publishing status of your application is now set to In production.

Grant Google / Gmail permissions to your site

Then go to APIs & Services " Credentials via the left-hand side menu.

Once on this page, look for the section OAuth 2.0 Client IDs. You'll see information about the Web application you've just created. To display the Customer ID and the Customer SecretClick on the pencil icon.

This will open the full details of your application. On the right-hand side of this page, you'll see the Customer ID.

Scroll down the page to the Customer secretsthen click on the + ADD SECRET.

The new Secret customer will appear below the default one. Click on the copy to copy its value.

Then copy these two values in the corresponding fields of your parameters on WPMasterToolKit. Then save

Once the page has been refined, click on Confirm Authorization.

Then follow these steps:

Once you've finished, you'll be redirected to WPMasterToolKit's back office.

Finally, you can test whether everything is working by using WPMTK's test function:

Application icons near a digital recycle garbage can.
Starter
3.50$
/Month
Business
6.70$
/Month
Freelance
11.00$
/Month
Agency
28.00$
/Month

Conclusion

Configuring Gmail with WordPress may seem time-consuming and technical, but once you've taken the right steps, you'll benefit from an emailing system that's easy to use. reliable, secure and fully compliant with Google requirements.

Thanks to the native Gmail provider WPMasterToolKitAll this complexity is centralized and integrated directly into WordPress, without relying on third-party plugins or cobbled-together solutions. You benefit from modern OAuth authentication, excellent deliverability and a future-proof configuration, suitable for both showcase sites and more demanding professional projects.

Once authorization has been validated and the send test has been successfully completed, your site is ready to send clean, legitimate transactional emails recognized by Gmail.
All that's left for you to do is run your WordPress with peace of mind, knowing that your emails arrive where they're supposed to 📬