Are you experiencing email deliverability issues with your WordPress website? WP-Mail SMTP is the solution to ensure your emails reach your recipients’ inboxes reliably.
The Wp-Mail SMTP helps you stay organized by making your email delivery easy and reliable. It fixes your email delivery issues simply by reconfiguring WordPress to properly use an SMTP provider when sending emails.
In this article, we will guide you through the steps required for you to set up WP-Mail SMTP for Gmail on your WordPress site, and help you establish smooth and efficient email communication. Also by the end of this guide, you will get to know everything you need to know about the WP-Mail SMTP. Let’s dive in.
Table of Contents
What Is SMTP?
The acronym SMTP stands for Simple Mail Transfer Protocol. It is a standard communication protocol for sending emails from the sender’s email server to the recipient’s email server.
Your email client, whether it’s Gmail, Outlook, or Apple Mail, relies on SMTP to transmit your emails to your email server. This server has to deliver your message to the intended recipient.
The SMTP server is responsible for handling outgoing emails and ensuring they are efficiently delivered to the destination email server over the Internet.
In a case where proper authentication does not exist, emails either go into the SPAM folder or worse don’t get delivered at all.
How does WP-Mail SMTP Work?
The WP-Mail SMTP plugin takes over the email-sending process when you send an email from your WordPress website.
The plugin uses an external SMTP server specified in the settings to prevent delivery issues instead of relying on the default PHP mail function.
Whenever you use your website to send an email (such as through WP forms submissions, contact form submissions, notifications, or password reset emails), WP Mail SMTP will securely send your email data to the external SMTP server that you set up.
After which, the external SMTP server will process the outgoing email and act as the intermediary between your site and the receiver’s email server.
When the recipient’s email receives the incoming email from the external SMTP server, it stores it in the recipient’s mailbox.
If the email was delivered successfully, the recipient’s email server will send an email delivery confirmation to the external SMTP server. The external server in turn notifies your WordPress website about the email delivery success.
How to Set Up WP-Mail SMTP for Gmail on WordPress
In this section, we will walk you through every step required for you to successfully set up a WP-Mail SMTP to work effortlessly with Gmail on your WordPress website. Let’s dive in.
Install and Activate the WP-Mail SMTP Plugin
To start with, you will need to install and activate the WP-Mail SMTP plugin on your site.
The first thing to do is log in to your WordPress admin dashboard.
Navigate to Plugins and Click on Add New.
In the search bar, search for WP-Mail SMTP and click on the Install Now button.
After installing it, click on the Activate button to activate it.
Access WP-Mail SMTP Settings
Upon activation, a new page will be opened for you. Click on the Go Back to Dashboard link just below the Let’s Get Started button.
Configure the WP-Mail SMTP Plugin Settings
The next thing to do after going back to your dashboard is to begin the configuration process.
Stay with us while we walk you through these steps.
From the WP-Mail SMTP plugin settings page, locate General settings.
From Email
As you scroll down under the general settings, you will see the From Email portion of the page.
Here you will be required to insert the email address from which all your messages will be sent.
Go ahead and input your Gmail address in the address bar.
Checking the box beside the Force From Email option ensures that all the emails being sent from your site come only from the email account that you selected.
From Name
Just below the From Email option is the From Name option.
This is the name that is associated with the emails your website sends out and by default it carries the name of your site.
However, you can change the name to anything you like.
Once you’ve entered the name you want, check the Force From Name option as you can see in the image above. Doing this ensures that this setting is applied site-wide.
This means that any email sent from your site will carry that particular name as its identity.
The Return Path
The next step in the setup is The Return Path option.
We recommend that you check the Set the return path to match the From Email option. This is because checking the Set the return path to match the From Email option ensures that non-delivery receipts or bounce-back emails are not lost.
Mailer
This is where you will choose the Mailer you want to use on your site. So, go ahead and choose Google / Gmail.
When you choose Google / Gmail as your mailer, you will see a new section just below the Mailer titled Google / Gmail.
In this section, there are 2 fields labelled Client ID and Client Secret.
These fields will lead us to the next phase of this configuration process.
Creating a Web App in Google.
To get the information for the fields above, you will create a web app in Google using your Google account.
This process doesn’t require any coding knowledge, we’ll show you what to do.
Open a new tab in your browser, log in to your Google account and then open the Google Cloud Console.
If you are using Google Console for the first time, you will see a pop-up asking you to select your country, to accept the Terms of Service and Email Updates. Go ahead and do so. Click on Agree and Continue afterwards.
Creating a Project
The next thing to do is to create a project for your app.
To do this, click on the Create Project tab on the right side of your screen to initiate this process.
On the New Project page, enter a Project Name and select an organization for your project.
Next, click on the Create button.
Gmail API Enabling
The next thing to do is to enable the Gmail API for your project.
To do this,
Navigate to the sidebar of your Google Cloud Console, locate the APIs and Services tab and click on Library.
A new page will be opened for you welcoming you to the Google API Library. Scroll down to Google Workspace and locate the Gmail API. You can find the Google Workspace on the main screen or in the sidebar.
When you do, navigate to Gmail API and click on it.
Next, click on the Enable button beside the Try This API button.
Creating your Gmail API Credentials
After enabling the Gmail API, the next thing to do is to create your application’s credentials.
To do this, locate the CREATE CREDENTIALS button on the newly opened page and click on it.
On the next page, you will be required to answer some questions about the type of credential you want to create.
Under the Select an API dropdown, choose the Gmail API. and under What data will you be accessing? Select the User data and click on Next.
The next thing to do is to configure the OAuth Consent Screen. So go ahead and fill out the required fields.
- App name: Enter the name you wish to name your App
- User support email: Here you will select your email address from the list of emails provided.
- App logo: You can choose to upload a logo for your app if you have one. This field is optional.
After setting up your App name and User support email, the next thing is to set the Developer contact information.
Enter your email in the email address field and then click on SAVE AND CONTINUE to proceed to the next phase.
Scopes (Optional) – WP-Mail SMTP
This step is optional, so we’ll be skipping it for this tutorial. Scroll down this section and click on the SAVE AND CONTINUE button.
OAuth Client ID Setup
The next step is to set up the OAuth Client ID.
Under the Application type, select the Web application from the dropdown list. Doing this will open up more fields.
You can choose to leave the name in the Name field the way it is, or you can change it to any name of your choice. For this tutorial, we’ll be leaving it the way it is.
Skip the Authorized Javascript origins section and move to the Authorized redirect URIs section.
Click on the +ADD URI button and input the following in the field provided:
https://connect.wpmailsmtp.com/google/. Click on CREATE afterwards.
Once you click on the CREATE button your Credential ID will be shown to you. You don’t have to copy or download it as you will be able to access it in a later step.
Click on the DONE button instead.
Congrats on getting to this stage. The next step is to change your app’s publishing status from Testing to Production.
Changing Your App’s Publishing Status from Testing to Production
It is important to know that Google will by default put your app in internal mode (Testing), which comes with a lot of limitations and won’t function well.
So you will need to change it to External mode (Production) and publish it.
To do this, from your Google Cloud Console sidebar, navigate to the OAuth consent screen under APIs and Services and click on it.
Next, click on the PUBLISH APP button to change its status from Testing to Production.
Clicking on the PUBLISH APP button will open a pop-up screen for you. Click on the CONFIRM button on the pop-up screen to validate your choice.
Once the confirmation is complete, you will see that your app’s publishing status has changed from Testing to In production.
The next step is to grant your site Gmail permissions.
Granting Your Site Gmail Permissions
To do this, click on the Credentials tab on the sidebar.
Once you are on the credential page, you can see the details of the app you created under OAuth 2.0 Client IDs.
To retrieve your Client ID and Client Secret click on the pencil icon
Doing this will open up all the details for your app. Your Client ID and Client Secret are on your screen’s right side.
Go ahead and copy them into their respective fields in your WP-Mail SMTP settings.
Once you have filled both fields, scroll down and click on the Save Settings button.
Once you click on the Save Settings button, the page will refresh.
Next, you will grant permissions to your plugin, before Google allows it to use the Gmail API to send emails.
To do this, scroll down to the bottom of the screen and click on Allow plugin to send emails using your Google account.
Clicking on this button will open up a new login screen for Google. Log into the Google account you are setting up SMTP with.
Google’s Verification Warning Bypass
This is for free Gmail users only.
Once you log in with the account you are setting up SMTP with, you will see on the new screen a warning info stating that Google has not verified your app.
Go ahead and click on the Advanced link on the screen.
In the expanded option, click on Go to wpmailsmtp.com (unsafe). This happened because Google has not yet verified your app.
More importantly, there’s no need for you to verify the app since you created it for your use.
On the new screen, click on the Continue button to grant Google access to your WP-mail SMTP
Once you click on the Continue button, you will be redirected back to the WP-mail SMTP settings screen. Click on the Save Settings button to complete your settings.
A message will be delivered to you stating that you have successfully linked your site to a Google API project. Now you can start sending emails through Gmail.
Sending a Test Email
This is the final step in your set-up.
On the WP-Mail SMTP settings page, click on the Email Test link on the menu list.
On the new screen, enter the email address where you want the test email to be sent. Also, you can choose whether you want the email to be in plain text or HTML format.
Click on the Send Email button afterwards.
Next, you will receive a message stating that you have sent your email successfully.
Also, check the inbox of the email address you sent the test email to, to ensure that the message was delivered. As shown below.
READ ALSO: Redirecting Category Page URLs Using Rank Math
FAQs
Is WP-Mail SMTP free?
WP Mail SMTP has a free and a premium version. The free version can be found in the WordPress plugin repository. It allows users to configure an SMTP server for sending emails and log basic email information.
However, WP Mail SMTP has a premium version available that offers more advanced features and integrations. This includes support for popular email service providers like Gmail, SendGrid, and Mailgun. The premium version has additional functionality and priority support, but it does require payment.
What is the SMTP server URL for Gmail?
The SMTP server URL for Gmail is smtp.gmail.com
Can I send bulk emails using WP-Mail SMTP?
The Wp-Mail SMTP is designed to send transactional emails and not for sending bulk marketing emails. However, if you need to send bulk emails, you may need to consider dedicated email marketing services.
Can I use WP-Mail SMTP for outgoing emails only?
Absolutely! With WP-Mail SMTP, you have the capability to easily configure it to exclusively handle outbound emails.
This not only guarantees a trustworthy and secure email communication channel from your website but also grants you peace of mind knowing that your emails are in safe hands.
Why can’t I connect to my SMTP server?
There are many factors that can contribute to the difficulty of connecting to an SMTP server.
The most common reasons are incorrect server details, authentication issues, firewall or security software interference, ISP restrictions, server downtime, port blocking, SSL/TLS certificate issues, misconfigured WordPress plugins or email clients, and server status issues.
Check your server settings, authentication credentials, and software configurations carefully to resolve the issue. Contact your email provider or server administrator if issues persist.
Definitely! WP-Mail SMTP is designed to work with shared hosting environments. It optimizes email deliverability regardless of your hosting plan.
Conclusion
Setting up WP-Mail SMTP for Gmail on WordPress is an important step to enhance your email communication.
With this plugin, you can overcome common email deliverability challenges and ensure that your messages reach the intended recipients. By following our comprehensive guide, you’ll experience reliable and secure email communication with ease.
Now, take the first step to improve your email deliverability by installing and configuring WP-Mail SMTP. Enjoy seamless communication and engage your audience effectively!