Most people know Gmail for its clean interface and useful features, like search operators and add-ons. But you can also use Gmail for more: the Gmail SMTP server.

With the Gmail SMTP server, you’ll be able to send emails from your Gmail account using other email clients, such as Outlook or Thunderbird. But more importantly, you can also use Gmail’s SMTP server to send emails from your WordPress site. For free!

This is a really great way to make your WordPress site’s emails more reliable without needing to spend money on a dedicated email sending service. Gmail lets you send up to 500 emails per day, which is more than enough for the vast majority of WordPress sites.

In this post, we’ll cover everything you need to know about the Gmail SMTP server including:

How to Find the SMTP Server for Gmail

Let’s start with the most important question – what is the Gmail SMTP server?

To find the Gmail SMTP server, you can use these details:

There are also some other common (but not universal) Gmail SMTP settings you might find when trying to set things up. Here’s how to answer them if you encounter them:

Are you getting the most out of your Gmail account? 🤔 With the Gmail SMTP server, you can send emails from your WordPress site... for free! 💥 Learn more right here 👇Click to Tweet

Gmail SMTP Server FAQs

Before diving in, let’s answer some common questions about Gmail SMTP server.

What Is the Gmail SMTP Server Address?

As we detailed above, the default server address is smtp.gmail.com. You can log in using your full Gmail email address and your Google password.

Can I Use the Gmail SMTP Server for Sending Email?

Yes! You can. If you’re using other email clients, such as Thunderbird or Outlook, you can use the Gmail SMTP server details to still send emails via your Gmail account.

However, remember that SMTP is just for sending email. If you want to also receive emails to your Gmail account in another email client, you’ll need to use POP3 or IMAP. You can find these settings by opening your Gmail settings and going to the Forwarding and POP/IMAP tab.

Can I Use the Gmail SMTP Server to Send WordPress Transactional Emails?

Also yes! WordPress sends a lot of basic transactional emails for things like password resets, notifications, etc. and you can deliver all of those emails using the Gmail SMTP server.

With just a free Gmail account, you’ll be able to send up to 500 emails per day, which is significantly higher than the limits that other free SMTP servers apply.

If you have a paid Google Workspace account (formerly G Suite), Google will raise your limit even higher and let you send up to 2,000 emails per day. You’ll also be able to send emails from your own custom domain name instead of your Gmail address. That is, you can send from [email protected] instead of [email protected]. To do so, you’ll also need to set up G Suite MX records to connect your Google Workspace account to your custom domain name.

Note: Technically, the sending limits aren’t “per day”. Instead, the limits apply to a “rolling 24 hour period”. For example, you couldn’t send 500 emails at 11:59 PM on Monday and then another 500 emails at 12:01 AM on Tuesday.

Does the Gmail SMTP Server Still Work With Two-Factor Authentication?

Yes! You can use the SMTP server even if you’ve enabled two-factor authentication on your Google account. However, you will need to generate an app password so that the app can still connect.

You can generate an app password by visiting this page while logged into your Google account.

However, if you want to use Gmail’s SMTP server to send your WordPress site’s emails, we don’t recommend using this approach. Instead, you should use the Gmail API method that we’ll detail in the tutorial below. This lets you send emails using Gmail’s API instead of just entering the SMTP server details, which also has the benefit of avoiding problems with two-factor authentication.

How to Configure WordPress to Send Emails via Gmail SMTP Server

Now, let’s get into how you can use the Gmail SMTP server to send your WordPress site’s transactional emails for free. This method works great and will improve the reliability of your site’s emails over using the default PHP mail method.

To set this up, you’ll need to create a Google app so that you can connect to the Gmail SMTP server via the API instead of just plugging in the SMTP details. There are a good number of steps involved in doing this. This is just a one-time setup process. That is, once you take the 30-60 minutes to go through this setup, your site will continue to benefit on autopilot.

In addition to creating a Google app, you’ll also need the help of a WordPress SMTP plugin. We’re going to use the free Post SMTP Mailer/Email Log plugin, but the free WP Mail SMTP plugin is also another good option that supports the Gmail API.

The basic process goes like this:

  1. Install the Post SMTP Mailer/Email Log plugin (you need to do this first to get the URLs to use in your Google app).
  2. Create a Google app. This is the most complicated part of the process, but we’ll guide you through every step.
  3. Add your Google app API keys to the Post SMTP Mailer/Email Log settings.
  4. Send a test email to make sure everything is working.

Note – this tutorial is focused on using a free Gmail account. However, you can follow a similar process to configure your site to send emails via your Google Workplace (G Suite) account.

1. Install and Configure Post SMTP Mailer/Email Log

To get started, you need to install and activate the free Post SMTP Mailer/Email Log plugin from WordPress.org. This is what lets you configure your WordPress site to send emails via the Gmail API/SMTP server.

After activating the plugin, go to the Post SMTP tab in your WordPress dashboard and click the Show All Settings link underneath the big Start the Wizard button.

Then, go to the Message tab and set your “from” email address and name. You can use your Gmail address as the “from” email, or you could use a different email address if you prefer.

Next, go back to the Account tab and choose Gmail API in the Type drop-down. Once you make this choice, you should see some additional options in the Authentication box below. Keep this page open because you’re going to need the Authorized JavaScript origins and Authorized redirect URI details in the next step:

Choose the Gmail API option

Choose the Gmail API option

2. Create Your Google App

Now, you need to create a Google app. This is what allows your WordPress site to securely send emails via the Gmail API. Again, this is definitely the most complicated part of this process. However, it’s mainly just clicking lots of buttons, and we’ll give you all the steps/screenshots you need to make it through.

Create a Project

To get started, open a new tab and copy this URL to go to the Google Developers Console. There, you need to create a new project. If it’s your first time logging into the Developers Console, Google will prompt you to create your first project. Or, if you already have some projects, you can create a new one by clicking the dropdown in the top-left corner (marked by [1] in the screenshot below).

Create a new Google Developers project

Create a new Google Developers project

Enable the Gmail API

Once you’ve created your project, click the button to Enable APIs and Services (shown in the screenshot above).

On the next screen, search for “Gmail” and choose the Gmail API result:

Search for the Gmail API

Search for the Gmail API

Then, click Enable in the full Gmail API page:

Enable the Gmail API

Enable the Gmail API

Create Credentials

Now, you should be in a dedicated interface for the Gmail API. Click the button to Create Credentials:

Create credentials for the Gmail API

Create credentials for the Gmail API

Fill out the Find out what credentials you need form using the following information:

Once you’ve done that, click the What credentials do I need? button at the bottom.

Fill out credentials form

Fill out credentials form

Set Up a Consent Screen

Now, Google will prompt you that you need to set up a consent screen. This is the same type of authorization screen that you see when you use Google to sign up/login to a site.

You need to do this to satisfy Google’s requirements, but you don’t need to worry about the information that you enter because you’ll only be using this for your own WordPress site.

Click the button to Set Up Consent Screen:

The prompt to create an OAuth consent screen

The prompt to create an OAuth consent screen

This should open a new tab where you can configure an OAuth consent screen (keep the original browser tab handy because you’ll need to go back to it in a second). Under User Type, select External. Then, click Create:

Create an external consent screen

Create an external consent screen

On the next screen, enter basic details for your site. Again – you don’t need to worry about what you put here because you’re the only person who will see this information.

Configure the consent screen

Configure the consent screen

Once you’ve added the information, click Save at the bottom.

Finish Adding Credentials to Your Project

Now, go back to the tab that contains the Add credentials to your project interface and enter the following information:

Create your credentials

Create your credentials

Once you’ve added everything, click Refresh. Then, the Refresh button should change to Create OAuth client ID – click that to finish the process and then click Done.

Now you’re almost finished!

Tired of a slow host for your WordPress site? We provide blazing fast servers and 24/7 world-class support from WordPress experts. Check out our plans

Once you click Done, you should see a section for OAuth 2.0 Client IDs in the Credentials tab of your project (which should automatically open after you click Done).

Click on the entry for the name that you just created:

Access OAuth 2.0 client IDs

Access OAuth 2.0 client IDs

Now, you just need to find two pieces of information:

Keep these values accessible because you’re going to need them in the next step:

Your Gmail API client IDs

Your Gmail API client IDs

3. Add Gmail App Client IDs to Post SMTP Mailer/Email Log

To finish the setup, go back to the Post SMTP Mailer/Email Log settings in your WordPress dashboard and paste in the Client ID and Client secret from the previous step. Then, make sure to save your changes:

Add Gmail API client IDs to WordPress

Add Gmail API client IDs to WordPress

Then, the plugin should prompt you to Grant permission with Google:

Grant permission to Google

Grant permission to Google

Clicking that link will open the normal Google authorization process (again, just as if you were registering for a site using Google sign-on). However, because you didn’t submit your app to Google for review, Google will show you a warning that “This app isn’t verified”.

Because this is your own app, you can safely ignore the warning. Click the option to show advanced settings and then click Go to “yourwebsite.com” (unsafe) link to continue the authorization process:

Ignore the warning to continue

Ignore the warning to continue

You’ll now go through the regular process. Make sure to choose the option to Allow your WordPress site to have access to your Gmail account. It needs these permissions to send emails via the Gmail SMTP server.

And that’s it! There were quite a few steps, but you’re now pretty much finished.

4. Send a Test Email

To make sure everything is working, Post SMTP Mailer/Email Log includes an option to send a test email. You can access this from the main settings page:

How to send a test email via the Gmail API

How to send a test email via the Gmail API

You can enter the email that you want to send a test message to.

Then, you should see a success message in the plugin’s settings:

The Success message for your test email

The Success message for your test email

And if you go to your email inbox, you should also see a test email:

The actual email that you should see in your inbox

The actual email that you should see in your inbox

If all goes well, you’re finished.

Your WordPress site will now send all of its emails using the Gmail SMTP server. You can make sure that this is happening by going to Post SMTP → Email Log. This will list all of the emails that your site sends (along with any errors if the plugin encounters problems):

How to view a log of the emails that your site sends

How to view a log of the emails that your site sends

Looking for a free and reliable way to send emails from your WordPress site? ✅ Gmail's SMTP server could be the answer. Find all the details in this guide!Click to Tweet

Summary

The Gmail SMTP server lets you send emails using your Gmail account and Google’s servers.

One option here is to configure third-party email clients, such as Thunderbird or Outlook, to send emails via your Gmail account. The default Gmail SMTP details are as follows:

Another option is to use Gmail to send your WordPress site’s transactional emails. With a limit of 500 emails per day, Gmail’s free sending limits are significantly higher than other free SMTP services such as SendGrid or Mailgun.

However, if you’re doing this, you should send emails via the Gmail API instead of just using the SMTP server details.

While setting up an app to use the Gmail API does add some one-time complexity to the process, it’s worth the effort because it gives you a reliable and secure way to send your site’s emails.

Now that you’re all set, check out our list of Gmail add-ons to enhance your e-mail productivity.

Do you still have any questions about the Gmail SMTP server or how you can use it with WordPress? Ask us in the comments!


If you enjoyed this article, then you’ll love Kinsta’s WordPress hosting platform. Turbocharge your website and get 24/7 support from our veteran WordPress team. Our Google Cloud powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the Kinsta difference! Check out our plans