Set up Gmail SMTP server in Wordpress

リン (linh)
Goalist Blog
Published in
3 min readSep 4, 2021

SMTP (Simple Mail Transfer Protocol) is an internet standard communication protocol for electronic mail transmission. Sending and receiving emails is one of the most basic functions of every single Wordpress site, and we can not do that without configuring SMTP.

This small tutorial will let you know how to set up SMTP with your G-Suite email account.

Step 1:

Download “WP Mail SMTP by WPForms” plugin. After that, activate plugin and go to it’s settings and launch the setup wizard.

“WP Mail SMTP by WPForms” Plugin
Setup wizard provided by the plugin

Step 2:

If you have set up your SMTP with other plugins, there’ll be a step that helps import data from that plugin. If this is the first time you set up plugin SMTP, you can skip. Then, select Gmail as your SMTP Mailer.

Step 3:

After choosing mailer, there’ll be a configuration screen where you need to fill in the ClientId and Client Secret. Leave the screen as is, and go to https://console.developers.google.com/apis/dashboard

Step 4:

The link will lead you to Google cloud platform page. Here, you can create new project to use different Google Api services.

Sign in with your G-suite mail, then create new project.

Step 5:

Select your project and click “Enable APIS and Services”. Find “Gmail API” and enable it.

Step 6:

Go back to your project and click on “Credentials” from left panel.
Now, when you click create credentials, there’ll be options, select “Help me choose”.

Step 7:

Setting up credentials following below images.

At credential type, choose Gmail API and User data
Add your app name, and your email

- The “Scopes” is optional and you don’t have to do anything with it, so go ahead to OAuth Client ID.
- Choose you application type as web application and the name is whatever you want.
- For “Authorized Javascript origins”, add your website domain.
- For “Authorized redirect URIs”, remember the wizard where we left off, go back and copy the “Authorized Redirect URI” provided by the plugin and add it here.

When all done, click “Create” and go back to your credentials page.

Step 8:

The credential you’ve just created will appear, click on the edit icon. You will see your clientID and client secret key.

Copy those keys and paste it to the SMTP wizard setting that we left off.
The remaining steps are simple, just follow the wizard and you’re done with the setting.

--

--

リン (linh)
Goalist Blog

A career-changed-non-tech-background point of view.