What is the incoming and outgoing mail server for gmail

From version 3.4.0 Hesk supports OAuth authentication instead of a basic username/password one.

While Google still supports basic authentication with the help of App Passwords, you are encouraged to set up OAuth for Google mail instead if you are a Google Workspaces user.

Having problems getting Gmail to work with HESK? Try these settings.

» Email sending

To send emails using the Gmail server enter these details:

SMTP Host: smtp.gmail.com
SMTP Port: 587
Encryption: TLS
SMTP Username: (your Gmail username)
SMTP Password: (you need to use a Google App Password, not your Gmail password!)

Also, make sure your "From email address" in HESK settings is set to your Gmail email address!

If you get an authentication error from Google, create & use Google App Passwords

Still no luck? Check with your host if they have port 587 blocked in your firewall.

» IMAP fetching

To fetch mail using IMAP from the Gmail server enter these details:

IMAP Host: imap.gmail.com
IMAP Port: 993
Encryption: SSL
IMAP Username: (your Gmail username)
IMAP Password: (a Google App Password)

» POP3 fetching

To fetch mail from the Gmail server using POP3 enter these details:

POP3 Host: pop.gmail.com
POP3 Port: 995
TLS Protocol: ON
POP3 Username: (your Gmail username)
POP3 Password: (a Google App Password)

Important: make 100% sure that "POP3 download" in your Gmail settings is set to "Enable POP for mail that arrives from now on". If not, Gmail will send all existing (even read) messages to HESK when it first connects.

» Error messages

Connection timed out

Required ports are probably blocked on your server's firewall. Ask your host to configure the firewall to allow TCP connections on ports 587, 995, and/or 993.

Some hosting companies will not do that due to their policies. In that case, you will need to, in order to integrate Gmail with HESK, find another host or try the HESK cloud.

Also, try logging in with your Google account here to unlock it for application access.

Click the "Continue" button to Allow access to your Google account.

Password error: [AUTH] Username and password not accepted.
Too many login failures

Your username and/or password are not correct, double-check them ad remember passwords are CaSe SeNSiTiVe!

Password error: [AUTH] Web login required
See this article

Error: 0 could not connect to the host "pop.gmail.com"

This could mean that:

  • required ports are blocked on your server's firewall. Ask your host to unblock TCP connections on ports 587, 995 and/or 993

- OR -

  • SSL certificate verification fails on your server. Try this:
  1. download this file
  2. save it somewhere to your server, for example to C:\wamp\ssl\cacert.pem
  3. open your php.ini file
  4. find line
    ;openssl.cafile=
    and change it to the location of the cacert.pem file while also removing the starting ;
    openssl.cafile=C:\wamp\ssl\cacert.pem
  5. save and restart the server
  6. test again

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:

Check Out Our Video Guide to Using the Gmail SMTP Server to Send Emails for Free

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:

  • Gmail SMTP server address: smtp.gmail.com
  • Gmail SMTP name: Your full name
  • Gmail SMTP username: Your full Gmail address (e.g. [email protected])
  • Gmail SMTP password: The password that you use to log in to Gmail
  • Gmail SMTP port (TLS): 587
  • Gmail SMTP port (SSL): 465

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:

  • Requires SSL: Yes
  • Requires TLS: Yes
  • Requires authentication / Use authentication: Yes
  • Requires secure connection / Use secure connection: Yes

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 Google Workspace 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 Workspace (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:

What is the incoming and outgoing mail server for gmail
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).

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
Search for the Gmail API

Then, click Enable in the full Gmail API page:

What is the incoming and outgoing mail server for gmail
Enable the Gmail API

Create Credentials

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

Want to know how we increased our traffic over 1000%?

Join 20,000+ others who get our weekly newsletter with insider WordPress tips!

Subscribe Now

What is the incoming and outgoing mail server for gmail
Create credentials for the Gmail API

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

  • Which API are you using? Gmail API
  • Where will you be calling the API from? Web browser (JavaScript)
  • What data will you be accessing? User data

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

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
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.

What is the incoming and outgoing mail server for gmail
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:

  • Name – the name of your website (or anything else that’s easy to remember).
  • Authorized JavaScript origins – you can find this in the Post SMTP Mailer/Email Log plugin (Step #1).
  • Authorized redirect URIs – you can find this in the Post SMTP Mailer/Email Log plugin (Step #1).
What is the incoming and outgoing mail server for gmail
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!

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:

What is the incoming and outgoing mail server for gmail
Access OAuth 2.0 client IDs

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

  • Client ID
  • Client secret

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

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
Add Gmail API client IDs to WordPress

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

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
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:

What is the incoming and outgoing mail server for gmail
The Success message for your test email

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

What is the incoming and outgoing mail server for gmail
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):

What is the incoming and outgoing mail server for gmail
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:

  • Gmail SMTP server address: smtp.gmail.com
  • Gmail SMTP name: Your full name
  • Gmail SMTP username: Your full Gmail address (e.g. [email protected])
  • Gmail SMTP password: The password that you use to log in to Gmail
  • Gmail SMTP port (TLS): 587
  • Gmail SMTP port (SSL): 465

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!


Save time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 35 data centers worldwide.
  • Optimization with our built-in Application Performance Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to find the plan that’s right for you.

What are the incoming and outgoing servers for Gmail?

Incoming connections to the IMAP server at imap.gmail.com:993 and the POP server at pop.gmail.com:995 require SSL. The outgoing SMTP server, smtp.gmail.com , requires TLS. Use port 465 , or port 587 if your client begins with plain text before issuing the STARTTLS command.

Is Gmail a POP or IMAP?

Gmail supports IMAP clients that use IMAP4rev1, including: Microsoft Outlook. Windows Mail. Apple Mail.

How do I find the incoming and outgoing mail server?

In Outlook, click File. Then click Account Settings > Account Settings. In the Email tab, double-click the account that is the old email. Below Server Information, you can find your incoming mail server (IMAP) and outgoing mail server (SMTP) names.

What is the host name for incoming mail server for Gmail?

In the Incoming Mail Server section, enter the Gmail POP server settings: Host Name: pop.gmail.com. User Name: Your full email address. Password: The password to your email account.