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

Set Up Gmail 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.

For a manual SMTP configuration, the Google SMTP outgoing server is smtp.gmail.com. If your screen asks for the Gmail SMTP host or the Gmail SMTP server, enter that same address.

Visit Gmail SMTP port depends on the encryption method you choose: use port 465 with SSL or the port 587 with TLS. These settings correspond to the search terms «Gmail SMTP settings,» «Gmail SMTP port,» and «Gmail SMTP port.».

For manual SMTP configuration, the Google SMTP server is smtp.gmail.com. If the field is labeled «SMTP host» or «server,» enter this address. Use port 465 with SSL or port 587 with TLS.
This tutorial configures WPMasterToolKit's native Gmail provider using OAuth; therefore, you do not need to enter these manual settings in this configuration.

Discover the module :
Free

Why use Gmail SMTP 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.

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)
Gmail configuration selected in an email client

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.

Google Cloud Terms of Service Acceptance Window

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.

Google Cloud Console with a project selection button

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.

Project Selection Window with the "New Project" Button

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.

Project Creation Form with Name and Location

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.

Google Cloud menu showing the "Library" option

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

Gmail API Search in Google Cloud

Click on the result Gmail API.

Gmail API result displayed in a box in the Google Console

On theGmail APIclick on the blue button "ENABLE.

Google Cloud page for enabling the Gmail API

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.

Gmail API page with a "Create credentials" button

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.

Selecting the Gmail API and User Data

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.

Google OAuth Consent Screen Configuration Form

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.

«Save and Continue» button indicated by a red arrow

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.

Screen for creating a Google OAuth client ID

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

Google OAuth Client ID Form for Web Applications

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 :

Gmail Setup with Highlighted Authorized Redirect URI

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

Allowed Redirect URI Range with WordPress URL

Then click on the CREATE to finalize this step.

"Create" and "Cancel" buttons below a pending note

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.

Google OAuth Credentials Download Screen

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

Google Cloud menu showing the OAuth consent screen

Then click on the Audience.

Google Auth Platform menu with an arrow pointing to "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.

«MAKE EXTERNAL» button in Google Auth Platform


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

Application publishing window with «In production» selected

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.

«Publish App» button in Google Auth Platform

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

Google window confirming the deployment of an application

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

Publication status showing «In production»

Grant Google / Gmail permissions to your site

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

Red arrow pointing to «Credentials» in Google Cloud

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.

Google Cloud Credentials Page with OAuth Web Client

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

Google OAuth screen displaying a masked client ID

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

"Client Secrets" page with an "Add Secret" button

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

Arrow pointing to the "Copy Client Secret" icon

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

Gmail configuration screen with Client ID and secret fields

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

Setting Up Gmail with an Authorization Confirmation Button

Then follow these steps:

Google User Account Selection Screen
Google authorization screen for an unverified app

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:

Email Test Form with a "Send Now" Button

Gmail IMAP and Gmail SMTP: What's the Difference?

SMTP is used to send emails; IMAP is used to receive and synchronize messages. The Gmail IMAP server is imap.gmail.com, with the port 993 via SSL. IMAP settings are not required to send WordPress emails using the Gmail OAuth provider.

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.

With WPMasterToolKit's native Gmail provider, authentication is handled via OAuth. The server and port fields above are for a manual SMTP configuration; they should not be entered in the OAuth configuration described in this guide.

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 📬

App icons next to a digital trash can.
Starter
3.50$
/Month
Business
6.70$
/Month
Freelance
11.00$
/Month
Agency
28.00$
/Month