Configure GMAIL SMTP Settings For WordPress| A Complete Solution

The Missed Technicality

Do you want to send an email through WordPress but are failing to do so every time? Or, are your most critical emails landing into spam folder? This is because of a setting called Gmail SMTP – which if not configured properly can lead to the problems such as those above mentioned. 

The reason why WordPress doesn’t send your email is because your hosting server is not properly configured to utilize php mail functions. And, if it is configured, chances are upcoming emails will land into spam folders (which isn’t a good thing at all). So to help you land your all emails in inbox folder instead of spam folder securely, you’ll have to configure SMTP credentials of your hosting server in your WordPress admin area. Then, you will have to install WPMail SMTP Plugin for WordPress.

Gmail SMTP settings for WordPress are hard to do because of a few technicalities. And certainly, it is going to be a discouraging experience if you’re going to do it the hard way.
However it is not an impossible feat. In this article, we will guide you with a step-by-step process on how to configure Gmail SMTP settings for your WordPress website. 

We will start by giving a small but informative background on SMTP, the difficulties associated with configuring it in WordPress and then a guide on how you can do it.

What is SMTP?

SMTP is an acronym for Simple Mail Transfer Protocol.  Simply put, SMTP helps your message get across.  Think of it as an online one-way post office for all your mail deliveries. 

Yes, you read it right!!

What SMTP does is that it can easily send your email but doesn’t receive your emails. Technically, it is TCP/IP protocol for sending messages, but it doesn’t line up messages at the receiving end. The SMTP protocol follows the following procedure:

  • It is used for sending a message from an email client (e.g., Gmail) to an email server.
  • Then, the email server capitalises on SMTP (as a relay service) in order for an email to reach out to the receiving server.
  • In the end, the receiving server brings the email client into action for downloading incoming mail through IMAP and sending it into the recipient’s inbox.

 

It’s a bit on the heavier side, that is why it is difficult to correctly configure SMTP settings and that too in WordPress with Gmail as an email client. But why Gmail?

Why Gmail as an Email Client?

Although there are many SMTP protocols available apart from Gmail, for example, Amazon Workmail, GoDaddy, and Rackspace, the purpose of this article is to focus on Gmail as it is currently the widely used email client. 

Gmail being part of Google (always trying to make our lives easier) has a built-in SMTP support in it. It works on a ‘plug-and-play’ approach that means it can save money and time. 

However, if your website or you have to deal with a big volume of emails; you then must look at other options that I have mentioned  with flexibility, deliverability, and uncompromised security. We will try to cover the SMTP settings with other email clients in our upcoming blogs. But all that is for later.

Installing WP-Mail SMTP - The Quickest Way

First, a bit on the education side – why use WP-Mail SMTP? Why not any other or a simple  Since you are using WordPress for your website, using its own plugin is better. Other plugins tend to store unmasked passwords that might pose security threats.

Installing WP-Mail SMTP is simple. Follow the 3 steps below: 

  1. First, go the Plugins section and click ‘Add New’
  2. Then, go to the WordPress store, and look for WP Mail SMTP by WPForms.
    Once you find it, click ‘Install’
  3. After that, click Activate. 

There you go, WP-Mail SMTP is installed on your website. After this comes the other part – connecting to the Gmail Account. 

How to Connect your Gmail Account using WP Mail SMTP?

This next step is relatively linear and easy-to-do. Just put your gmail username & password, and a few SMTP server settings, and you’re good-to-go. At first, go to settings> WP Mail SMTP, and follow all the steps provided below:

1. From Email

Add your email account here because Google will match this email to your email account. So, it’s vitally important to put useful information in a folder of ‘From Email’

Email

2. From Name

‘From Name’, means all the names with emails you send out to people. It comes by default into your site. However, you can readjust to any value (as per your need) and the From Name can separately apply settings across the website.

Name

2. Mailer

In this section, you’ll select a mailer for your WordPress website. In this blog, we’re picking ‘Google’ as our mailer, so now you will have to select the Gmail option.

Mailer

After you’ve completed this whole setup – click ‘Save’ and you’re good-to-go to send email with the help of SMTP. Once this is complete you will see the following section appear in your Gmail:

Mailer

In order to gain information for the above fields, creating a web application using your Gmail account is a must. 

The good news is that the easy part is complete. The not so good part is that you will need to create this web application and that is what this next section is about. 

How to Create a Web Application in Gmail?

First, log in to your Gmail account and go to the application registration form of Gmail called ‘Register your application for Gmail API in Google API Console’. (Do keep your WP-Mail SMTP open as we will be discussing that too).

You will see the screen shown below. Just keep the default selection and then click ‘Continue’. 

hoot
The next screen that will appear will show you that the ‘API is Enabled’. Then as shown below just click on ‘Go to Credentials.’
credentials

Once you get on the Credentials screen, select the relevant options as shown in the screen below. Once you do, click on the ‘What credentials do I need’ option.

credentials

Next, you will be taken to a consent screen where you will have to set it up. This will open in a new window where you will be guided to set up the consent screen. (shown below):

credentials

Once the screen opens, select the option ‘Internal’ since we are trying to restrict the access to the SMTP settings i.e. only selected users can use it. (see below):

credentials

As you select the option above, the next screen that will pop up is to add the name and logo of the application i.e. your website (see below). Fill in all the relevant information and click ‘Save’. (if you need any help in filling out this form, just follow the picture as guidance or contact your WordPress Website Maintenance Company to help you out).

appliction
appliction

You are doing great up till now!!. But this is not the end — sorry..!! Few more steps and you will be done. Promise!!

 

Once you save the applications consent page, you will be redirected to the API credentials screen. Here, you will have to make an OAuth client ID which will allow your website to authenticate the emails you receive via Gmail Account. 

First, in the Name field, you can use your real name or may opt to leave it as iIt’s all for referencing.

Then, you will use your website’s URL in Authorized JavaScript origins.

Lastly, you will have to fill the Authorized redirect URLs field. Go back to your WordPress’s tab and access Settings> WP Mail SMTP page, and now look for Authorized redirect URL under the Gmail section. You will have to put all the values in fields carefully followed by other details. You can copy these values by clicking on the copy icon (see below for reference):

return

When you’ve copied the URI, you’ll return to the Google APIs and paste it immediately into the field below Authorized redirect URIs.

user

When you’ve filled in these details, you will see a ‘Refresh’ button near the bottom of your page that you will have to ‘Click’.

user

As soon as your Refresh everything, a new option will appear, ‘Create OAuth client ID’.

user

Congratulations!!!. Your Google Web App is now created.
After you have successfully built a Google web app, you need to look for the full details and hit ‘I’ll do this later’ option (shown below) to reach out to the credentials page.

credintial

Though it was easy to set up WP Mail SMTP as you can read above, the requirement of Google in which you have to setup and configure the app in order to route the email using their SMTP servers which you just did was a bit difficult. But you did it. Hooray!!!!

Now to test it out.

How to Set WordPress Email Delivery with Google SMTP?

Once all is set, you will now be able to view the details that you entered in the Web App on your Credentials Page. . If you want to view ‘Client ID’ and ‘Client Secret’, click the pencil icon as shown in the screenshot below:

gogolesmtp

Now it will open all of the details of your application. Right on that page, you’ll find ‘Client ID’ and ‘Client Secret’ values like below:

applicationid

Copy these values into your WP Mail SMTP setting on your WordPress admin screen.

gmail

Once you save these settings, then you will have to refresh the page. Google will use this information for connecting you to your account. But first, you will have to grant Google permission to do so. In order to do this, you will have to scroll down to the bottom of a page, and hit ‘Allow plugin to send emails using your Google account’.

gmail

As soon as you click it, a login screen for Google will open. Just go ahead and log into the account that is registered with your SMTP. The next screen you will see is the request for permission where you will have to click ‘Allow’. (see below)

gmail

Return to WP Mail SMTP settings, and it will show a success message telling connection is complete and you can send a test email via Email Test tab.

mail

When you’ve opened the ‘Test Email Tab’, you have to put a valid email address and hit the ‘Send Email’ button. Only use that email address which you could use to confirm the test email when it reaches your inbox.

smtp

When you’ve sent the test message, it will display a success message at the top of your Window.

smtp

In the end, you’ll soon get a test mail at the email address you’ve used for this purpose especially.

smtp

WoooHoooo!!!! All Done!!! Time to wrap it up.

Wrapping up the Article

The goal of this article was to help you understand the ins and outs of Gmail SMTP settings for your WordPress website. In all honesty, you can see from the above guide, it is not the easiest method but we have tried to solve it for you in the easiest way possible. This will take 10 to 15 minutes of your time and will cost you nothing.

But, still if you think that such configuration is beyond your expertise, then contact us at  WP-Bridge. Our experts will be more than enthusiastic to not only set up the Gmail SMTP but also guide you so that you are able to do it on your own next time. 

Happy configuring!!

WordPress Website Monitoring 24/7?

Let us manage your WordPress site with top-notch security and high-end technical features– all-in-one-place.

Recent Blog

Tired of a Slow Loading Website? Want to Make WordPress website Load Faster?

WP Bridge uses cookies and similar technologies as strictly necessary to make our site work. We and our partners would also like to set additional cookies to analyze your use of our site, to personalize and enhance your visit to our site and to show you more relevant content and advertising. For more information, please read our Privacy Statement.

Website Audit Form

We’re looking forward to providing ongoing support for your website! Please fill out the form below for website audit report.
This is the website URL for your monthly maintenance package.