Gmail SMTP Server is a simple way to send email in WordPress

Spread the love

Do you have any problem sending emails from your WordPress site? One simple way to  send WordPress emails using the Gmail SMTP server. In this article, we are going to show you how to send emails from your WordPress website utilizing the SMTP server by Gmail.


Why and When You Need SMTP Server for WordPress Emails

Your WordPress site sends messages to advise you of new client registration, lost secret word reset, programmed refreshes, and even warnings from your contact frames.

As a matter of course, WordPress utilizes the PHP mail capacity to convey email warnings. Be that as it may, this capacity does not fill in not surprisingly because of various reasons.

Most WordPress hosting companies confine utilization of this capacity to anticipate manhandle and spam.

Spam filters on well known email specialist organizations browse approaching messages to screen in the event that they are sent from genuine mail servers. Default WordPress messages come up short this check and now and then may not make it to the spam envelope.

SMTP (Simple Mail Transfer Protocol) is the business standard for sending messages. Dissimilar to PHP mail work, SMTP utilizes appropriate validation which expands email deliverability.

Gmail gives SMTP benefit that you can use to convey messages from your WordPress site. In the event that you simply need to send WordPress warning emails to yourself and couple of clients on your site, at that point SMTP Server by Gmail  are the best choice.

However, if you are planning on sending newsletter emails using WordPress, then you should use a mass emailing service provider, like MailGun or SendGrid.

Free vs Paid SMTP Service for WordPress

You can use your free Gmail account to send out WordPress emails. However, for better deliverability, we recommend using paid Google Apps for Work with Gmail.

With Google Apps for Work, you get your own professional marked email address such as (

Google Apps expect you to add MX records to your space name which implies that your messages will seem, by all accounts, to be originating from your own area name boosting legitimacy and guaranteeing better deliverability.

We utilize Google Apps for Work for WPBeginner and can genuinely say it’s the best.

How to Send Email using Google SMTP Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

How to Send WordPress Emails Using  SMTP Server [Gmail]

On the off chance that you chose to use Google Apps for Work, at that point you first need to set up your space to work with Google Apps. We have a well ordered instructional exercise on the best way to setup a professional email address with Google Apps and Gmail.

READ  Custom Web Design vs Website Template - [Infographic]

Rest of the guidelines are the same whether you are utilizing paid or free Gmail account.

To start with thing you have to do is introduce and enact the WP Mail SMTP plugin. For more points of interest, see our well ordered guide on how to introduce a WordPress module.

Upon enactment, you have to visit Settings » WP Mail SMTP page to arrange the module settings.

WP Mail SMTP Settings

First you need to make sure that you use your Gmail email address in the ‘From Email’ field. Next, you need to provide the sender name.

WP Mail SMTP plugin offers two ways to connect your WordPress site to the Gmail servers.

The first method uses OAuth Authentication. This is a more secure method to send emails using Gmail servers.

The second method is by entering  SMTP [Gmail]  settings manually. This method is not recommended because it is less secure.

That being said, let’s set up WordPress to use SMTP by Gmail for sending emails.

Method 1: Setting up Gmail to Send WordPress Emails using OAuth Protocol

This method is recommended for all users. It is more secure and once you set it up, you’ll never have to do that again.

You need to start by selecting Gmail as your mailer and set the return path to be the same as sender.

Select Gmail and set return path

Next, you will see the alternative to enter your Client ID, Client Secret, and a URL in ‘Approved divert URI’ field.

How about we set up these fields.

Creating an App and Generate API Keys for Gmail

Visit the Google Developers Console website and create a new project.

Create a new Google Developer Console project

On the off chance that you don’t see the blue catch to make an undertaking, at that point you can likewise tap on select a task drop down and make another venture.

You’ll be approached to give a name to your task. Give it a vital name, with the goal that you can undoubtedly remember it later on.

Name your project

From that point forward, tap on the make catch to proceed.

Engineer comfort will now make your venture and take you to its dashboard. Google offer designers access to huge numbers of their APIs and administrations. You have to empower the APIs that you will requirement for this venture.

Enable APIs

Tap on Enable APIs and administrations catch to proceed.

This will convey you to the APIs library page. Next, you have to type Gmail in the hunt box to rapidly discover the Gmail API and snap to choose it.

Select Gmail API

You will now observe a review of the API and what it can do. Just tap on the ‘Empower’ catch to proceed.

READ  How to Solve 403 forbidden NGINX

Enale Gmail API

Now that your API is enabled, the next step is to create credentials that you can use in your WP Mail SMTP plugin settings.

Click on the create credentials button to continue.

Create credentials

On the following screen, you should select ‘Web program JavaScript’ in ‘Where you’ll be calling the API from’ field. After that tap on the ‘User Data’ choice.

API credentials step 1

To continue, click on the ‘What credentials do I need?’ button.

You will now be asked to provide a name for your OAuth client name. You can enter ‘WP Mail SMTP’ here.

API Credentials step 2

Under JavaScript birthplaces field, you have to include your site’s space name. Next, you have to reorder the approved divert URL from WP Mail SMTP module settings.

After that click on the ‘Create client ID’ button to continue.

Next, you need to enter a name for OAuth consent screen. You can put the plugin’s name here.

Ouath consent screen

Subsequent to entering the points of interest, tap on the proceed with catch and the engineer support will demonstrate your customer ID. You can reorder this in the WP Mail SMTP module’s settings page. Nonetheless, you will even now need to include your customer mystery key.

Getting your client ID

Go ahead and click on the Done button to move on.

You will now be taken to your project’s credentials page. You will see your recently created credentials listed there. You need to click on the edit icon next to your credentials to continue.

Edit credentials

This will bring you to the edit credentials page where you will be able to see your client secret key. You need to copy and paste the key in your plugin’s settings page.

Client secret key

Return back to plugin’s settings page in your WordPress admin area. Now that you have both client ID and client secret keys, you need to click on the save settings button to continue.

Save client credentials in plugin settings

The plugin will now store your settings and reload the page. After that you need to scroll down to the bottom of the settings page and click on the ‘Allow plugin to send emails using your Google account’ button.

Allow plugin to send emails

This will take you to your account on Google, and you will be asked to give the website permission to send emails on your behalf.

Allow Gmail

Click on Allow button to give permissions.

After that, you will be redirected back to your website where you will see a success message.

Connected successfully

Method 2: Setting up Gmail SMTP as SMTP Sender

This method allows you to manually connect to Gmail’s SMTP servers to send your WordPress emails.

First, you need to visit Settings » WP Mail SMTP page to configure the plugin settings.

You need to start by providing the Gmail address you want to use in the From email field, and your name in the name field.

READ  How to Sell through Email Marketing - GetResponse

Gmail SMTP

Next, you need to select ‘Other SMTP’ as your mailer and check the box next to return path.

After that, scroll down to the Other SMTP section to configure more settings.

Gmail SMTP settings for WP Mail SMTP plugin

Here is the exact configuration you need to add in the plugin settings:

  • SMTP Host:
  • SMTP Port: 465
  • Encryption: Use SSL encryption
  • Authentication: Turn on authentication
  • Username: Your complete Gmail address, e.g. or
  • Password: Password of your Gmail account

Once you are done, click on the save changes button to store your settings.

That’s all, you have successfully setup WP Mail SMTP to use Gmail SMTP servers.

Testing Your WP Mail SMTP Settings

WP Mail SMTP module enables you to test your email settings, so you can ensure that everything is working appropriately.

You have to visit Settings » WP Mail SMTP page and tap on the ‘Email Test’ tab. Essentially give an email address that you can access in the send to field and tap on the send email catch.

Send test email

You will see a success message. You can now check your inbox to see a message with the subject line ‘WP Mail SMTP: Test Email to…’.

That’s all, you have successfully setup your WordPress site to send emails using the SMTP servers.

Troubleshooting Gmail SMTP Not Working Issues

We have seen users encounter few issues when using this SMTP with certain shared hosting configurations.

Find a way to settle the SMTP issue:

Login to your cPanel account and make an email account that matches your Google applications email address. This may appear to be interesting in light of the fact that you’re not utilizing your server for messages. This progression essentially traps your server into trusting that you’re sending the email through the server.

In your cPanel account, go to the MX Records and change the MX directing from programmed to remote. It may be somewhat precarious to discover since each host now has custom cPanel interface. You have to search for a little connection alongside MX that says Email Routing: Remote Mail Exchanger.

After that log again into your WordPress site and send a test email.

We trust this article helped you figure out how to send email in WordPress utilizing the SMTP server [by Gmail]. You may likewise need to see our rundown of the 5 best contact shape modules for WordPress.

On the off chance that you loved this article, at that point please buy in to our YouTube Channel for WordPress video instructional exercises. You can likewise discover us on Twitter and Facebook.

(Visited 307 times, 1 visits today)


I write about Multilingual WordPress, SEO, Website Performance, Plugins and Themes. Also, I like answering WordPress question on Quora. I like to research and review for Wordpress Plugin! Look for me if you have any Wordpress product!

ut accumsan mattis ut ut Donec

Pin It on Pinterest

Do you find this interesting?

Share it with your friends!