How to Use the Gmail SMTP Server to Send Emails for Free

Most people know gmail for its clean interface and useful features like search operators and plugins. but you can also use gmail for more: gmail’s smtp server.

with gmail smtp server, you will be able to send emails from your gmail account using other email clients like outlook or thunderbird. but more importantly you can also use gmail smtp server to send emails from your wordpress site. free!

this is a great way to make your wordpress site emails more reliable without spending money on a dedicated email sending service. gmail allows you to 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:

watch our video guide to use gmail smtp server to send email for free

how to find 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 this data:

  • gmail smtp server address: smtp.gmail.com
  • gmail smtp name: your full name
  • gmail smtp username: your full gmail address (for example, [email protected])
  • gmail smtp password: the password you use to login to gmail
  • gmail smtp port (tls): 587
  • gmail smtp port (ssl): 465

There are also other common (but not universal) gmail smtp settings that you might come across when trying to set things up. here’s how to answer them if you find them:

  • ssl required: yes
  • tls required: yes
  • authentication required / use authentication : yes
  • requires secure connection/use secure connection: yes

faq gmail smtp server

Before we dive in, let’s answer some common questions about the gmail smtp server.

what is the gmail smtp server address?

as detailed above, the default server address is smtp.gmail.com. you can login with your full gmail email address and your google password.

can i use gmail smtp server to send email?

yes! you may. If you are using other email clients, such as thunderbird or outlook, you can use the gmail smtp server details to continue sending email through your gmail account.

However, remember that smtp is only for sending emails. If you also want to receive emails to your gmail account in another email client, you will need to use pop3 or imap. You can find this setting by opening your gmail settings and going to the forwarding and pop/imap tab.

can i use gmail smtp server to send transactional emails from wordpress?

also yes! wordpress sends a lot of basic transactional emails for things like password resets, notifications, etc. and you can deliver all those emails using gmail’s smtp server.

With just a free gmail account, you will be able to send up to 500 emails per day, which is significantly higher than the limits other free smtp servers apply.

If you have a paid Google Workspace (formerly G Suite) account, Google will further increase your limit and allow you to send up to 2,000 emails per day. You will 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 this, you’ll also need to set up the Google Workspace MX records to connect your Google Workspace account to your custom domain name.

note: Technically, the sending limits are not “per day”. instead, the limits apply to a “continuous 24-hour period.” for example, you couldn’t send 500 emails at 11:59 p.m. m. Monday and then another 500 emails at 12:01 a.m. m. on Tuesday.

does gmail smtp server still work with two factor authentication?

yes! you can use smtp server even if you have enabled two factor authentication on your google account. however, you will need to generate an app password for the app to still be able to connect.

See Also:  Karma : project and task management

You can generate an app password by visiting this page while logged in to your google account.

However, if you want to use gmail’s smtp server to send emails from your wordpress site, we don’t recommend using this approach. instead you should use the gmail api method which we will detail in the tutorial below. this allows you to send emails using the gmail 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 through gmail smtp server

Now, let’s see how you can use gmail’s smtp server to send transactional emails from your wordpress site for free. this method works great and will improve the reliability of your site’s emails compared to the default php mail method.

To set this up you will need to create a google app so you can connect to the gmail smtp server via the api instead of just entering the smtp details. there are quite a few steps involved in doing this. this is just a one time setup process. meaning once you take the 30-60 minutes to do this setup, your site will continue to benefit on autopilot.

in addition to creating a google app, you will also need the help of a wordpress smtp plugin. we are going to use free smtp mail/email registration plugin, but free wp mail smtp plugin is also another good option compatible with gmail api.

The basic process is 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 trickiest part of the process, but we’ll walk you through each step.
  3. add your google app’s api keys to the post smtp/email registration settings.
  4. send a test email to make sure everything works.

note: this tutorial focuses on using a free gmail account. however, you can follow a similar process to configure your site to send email through 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 smtp mail sender/email registration plugin from wordpress.org. this is what allows you to configure your wordpress site to send emails through the gmail api/smtp server.

after activating the plugin, go to the publish smtp tab in your wordpress dashboard and click the show all settings link under the big start the wizard.

then go to the message tab and set your name and “from” email address. you can use your gmail address as the “from” email, or you can use a different email address if you prefer.

Next, go back to the account tab and choose gmail api from the type dropdown menu. once you make this choice, you should see some additional options in the authentication box below. keep this page open because you will need authorized javascript sources and authorized redirect 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 send emails securely through the gmail api. again, this is definitely the most complicated part of this process. however, it’s mostly about clicking a lot of buttons and we’ll give you all the steps/screenshots you need to do it.

See Also:  Hướng dẫn sync e63 / e71 với google và ovi

create a project

To get started, open a new tab and copy this url to go to the google developer console. there, you need to create a new project. If this is your first time logging into the developer 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 menu in the upper 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 api 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:

  • what api are you using? gmail api
  • where will you call the api from? web browser (javascript)
  • what data will you access? user data

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

Fill out credentials form

Fill out credentials form

Set Up a Consent Screen

Google will now prompt you to set up a consent screen. this is the same type of authorization screen you see when you use google to sign up/log in to a site.

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

click the button to configure the 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 containing the add credentials to your project interface and enter the following information:

  • name: the name of your website (or anything else easy to remember).
  • authorized javascript sources: You can find this in the post smtp mailer/email registration plugin (step 1).
  • authorized redirect uri: You can find this in the post smtp mailer/ email registration plugin (step #1).

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.

You’re almost done!

once you click done, you should see a section for oauth 2.0 client ids under the credentials tab of your project (which should automatically open after clicking done).

click the name entry 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:

  • client id
  • client secret

keep these values ​​accessible because you will 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/email registration setup in your wordpress dashboard and paste the client id and client secret from the previous step. then make sure to save your changes:

See Also:  Yahoo mail has no support number and gets rid of security questions. Now what? - The Denver Post

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”.

Since this is your own application, you can safely ignore the warning. click the option to show the advanced settings and then click the link go to “yourwebsite.com” (insecure) to continue with 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 almost done.

4. send a test email

To make sure everything works, the post smtp/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 configuration:

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 your emails using the gmail smtp server. you can make sure this happens by going to publish smtp → email log. this will list all the emails 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

gmail smtp server allows you to send emails using your gmail account and google servers.

One option here is to configure third-party email clients, such as thunderbird or outlook, to send email through your gmail account. 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 (for example, [email protected])
  • gmail smtp password: the password you use to login to gmail
  • gmail smtp port (tls): 587
  • gmail smtp port (ssl): 465

another option is to use gmail to send the transactional emails from your wordpress site. With a limit of 500 emails per day, Gmail’s free send limits are significantly higher than other free SMTP services like SendGrid or Mailgun.

however, if you are doing this, you should send emails through the gmail api instead of just using the smtp server details.

While configuring an application to use the gmail api adds some unique complexity to the process, it’s worth the effort because it gives you a reliable and secure way to send email from your site.

Now that you’re all set, check out our list of gmail plugins to improve your email productivity.

still have any questions about gmail smtp server or how you can use it with wordpress? ask us in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *