Tuesday, December 31, 2024
Google search engine
HomeGuest BlogsConfigure WordPress To Use Gmail using WP Mail SMTP

Configure WordPress To Use Gmail using WP Mail SMTP

Greetings and welcome back to yet another guide on how to integrate WordPress With Gmail for emails using WP Mail SMTP.

WordPress is one of the most popular CMSs in the world, powering over 40% of all websites on the internet. It allows users to create and manage websites easily without requiring any deep programming language. It was designed as a blogging platform but has evolved to be used for a wide range of website types, including business websites, e-commerce sites, and personal portfolios. It provides a simple and intuitive interface for creating, editing, and publishing content and allows users to customize their websites using a wide range of themes and plugins. The popularity of WordPress has been spearheaded by an extensive community of developers and users.

WordPress plugins are simply pieces of software that can be installed to add extra functionality and features to a WordPress website. The plugins are downloaded and installed from the official WordPress plugin repository or from third-party sources.

WP Mail SMTP is a WordPress plugin that makes it possible for users to configure and send emails from their WordPress website using an SMTP (Simple Mail Transfer Protocol) server. The default method for sending emails on WordPress is via the PHP mail function. This isn’t reliable and can sometimes result in delivery issues or emails being marked as spam.

The WP Mail SMTP provides a simple and user-friendly interface to set up and configure SMTP settings for email delivery. The users are required to specify their SMTP host, port, username, password, and other details required for SMTP authentication. The plugin also includes support for popular email services like Gmail, Yahoo, and Microsoft. In addition to that, users can troubleshoot email delivery issues by providing detailed logs and error messages.

Now let’s dive in and configure the WP Mail SMTP plugin on WordPress!

Prerequisites

Before you proceed, you need to have WordPress installed and running. You can follow any of the dedicated guides below:

Once installed, proceed as shown below.

#1. Creating a Gmail App and Generating API Keys

For this guide, we will configure Gmail as the SMTP mailer. First, you need to create an App and generate the API keys for the connection to occur.

To do this, access Google Cloud Platform and navigate to My Project > New Project as shown.

Integrate WordPress With Gmail for emails using WP Mail SMTP

For this guide, we will create a project and name it My WordPress SMTP

Integrate WordPress With Gmail for emails using WP Mail SMTP 1

Once the details have been provided, click on the create button.

The next thing is to enable APIs and services for the project.

Integrate WordPress With Gmail for emails using WP Mail SMTP 2

On the APIs library page, search for the Gmail API and select it.

Integrate WordPress With Gmail for emails using WP Mail SMTP 3

On the below page, enable the API.

Integrate WordPress With Gmail for emails using WP Mail SMTP 4

Once enabled, we need to create credentials to be used by WordPress for connections.

Integrate WordPress With Gmail for emails using WP Mail SMTP 5

Click on Create Credentials and select the ‘Gmail API’ option from the dropdown menu and choose ‘User data’ for what data will you be accessing the click Next

Integrate WordPress With Gmail for emails using WP Mail SMTP 6

Now set the Apps information. Give it a name, select the email address and also add a logo if you want. You also need to set the Developer contact information

Integrate WordPress With Gmail for emails using WP Mail SMTP 7

Next, proceed to the consent screen. On this page, just scroll to the bottom and click ‘Save and Continue’

Integrate WordPress With Gmail for emails using WP Mail SMTP 8

Now e need to set the details for OAuth Client ID. Set the application type as ‘Web Application’. Then type the name of the application.

Integrate WordPress With Gmail for emails using WP Mail SMTP 9

Scroll down and add Authorized redirect URLs. On this page add https://connect.wpmailsmtp.com/google/ in the URLs field.

Integrate WordPress With Gmail for emails using WP Mail SMTP 10

Hit the Create button. Then proceed and obtain the creds for the application.

Integrate WordPress With Gmail for emails using WP Mail SMTP 11

You can click done. The creds will be available in the credentials tab.

Integrate WordPress With Gmail for emails using WP Mail SMTP 12

To view the creds, click on the edit button.

Integrate WordPress With Gmail for emails using WP Mail SMTP 13

Now, these creds will be used in the next steps for the WP Mail SMTP Plugin configuration.

#2. Switch From Testing to Production (Free Gmail Accounts Only)

The app will be published in Testing mode if you have a free Gmail account. It is recommended that we push it to Production. To do this, navigate to the Cloud Console and click APIs & Services » OAuth Consent Screen in the left-hand navigation pane.

Integrate WordPress With Gmail for emails using WP Mail SMTP 14

Accept the prompt.

Integrate WordPress With Gmail for emails using WP Mail SMTP 15

That is it for Google configuration! Proceed with the WordPress configuration as shown below.

#3. Install and Activate WP Mail SMTP Plugin

On our WordPress site, we need to install and activate the WP Mail SMTP plugin. Navigate to the Plugins tab-> Add new and search for WP Mail SMTP as shown below:

Integrate WordPress With Gmail for emails using WP Mail SMTP 16

Once installed, activate the plugin.

Integrate WordPress With Gmail for emails using WP Mail SMTP 17

#4. Configure WP Mail SMTP Plugin for WordPress Emails

Now we are set to begin the configuration. After activating the plugin, the below page will pop on your screen to configure the plugin.

Integrate WordPress With Gmail for emails using WP Mail SMTP 18

If this does not pop up, you can still launch the configuration from your dashboard Mail SMTP Plugin->settings->launch setup wizard

Integrate WordPress With Gmail for emails using WP Mail SMTP 19

Now select the SMTP mailer. For this guide, we will proceed to configure Gmail as the mailer.

Integrate WordPress With Gmail for emails using WP Mail SMTP 20

Accept the prompt:

Integrate WordPress With Gmail for emails using WP Mail SMTP 21

Now we need to configure the Gmail mailer. Here, we will provide the Client ID and Client Secret as configured on Gmail in Step 1.

Integrate WordPress With Gmail for emails using WP Mail SMTP 22

Click Connect to Google and choose your account.

Integrate WordPress With Gmail for emails using WP Mail SMTP 23

In case you encounter a warning that your app is not verified, you should not worry. The Free Gmail users will see this because Google hasn’t checked it. But this isn’t required since the app won’t be used by anyone else. So click on advanced and proceed

Integrate WordPress With Gmail for emails using WP Mail SMTP 24

Allow access to the app, and if everything is okay, you will see this:

Integrate WordPress With Gmail for emails using WP Mail SMTP 25

#5. Set Up Your From Email and Default Alias

There is an option that forces all plugins and contact forms to use the same From Name if you want to. For this page, we will leave this disabled.

Integrate WordPress With Gmail for emails using WP Mail SMTP 26

Now you can enable the other required features such as logging for WordPress. This will use the build in email logging tools to track every email sent, Search, filter, and print email logs, Search and track the delivery status of any email etc.

Integrate WordPress With Gmail for emails using WP Mail SMTP 27

You can also set an email alias to receive recommendations.

Integrate WordPress With Gmail for emails using WP Mail SMTP 28

For pro features, you need to provide the license. If you do not want, you can skip this.

Integrate WordPress With Gmail for emails using WP Mail SMTP 29

Voila! We have successfully set up WP Mail SMTP for Gmail integration on WordPress.

Integrate WordPress With Gmail for emails using WP Mail SMTP 30

To send a test mail,

Integrate WordPress With Gmail for emails using WP Mail SMTP 31

The mail will be received on the Gmail account as shown:

Integrate WordPress With Gmail for emails using WP Mail SMTP 32

Final Thoughts

We have triumphantly walked through how to integrate WordPress With Gmail for emails using WP Mail SMTP. Now proceed and use WP Mail SMTP to send emails from your WordPress website. I hope this was informative.

See more:

RELATED ARTICLES

Most Popular

Recent Comments