How to send wordpress emails with google workspace SMTP

How to Send WordPress Emails with Google Workspace SMTP

Google Workspace (formerly Gmail) is one of the world’s most reliable and secure email sending services. Google’s clean interfaces and valuable features also make it one of the most user-friendly email servers.

Since it is a free email service you might want to use your Google Workspace account to send WordPress emails. Today in this article, we will elaborate on sending your WordPress emails with Google Workspace SMTP.

Why you should use Google Workspace to send WordPress emails?

First of all, WordPress doesn’t send emails to users. WordPress is a content management system, not an email server. Many WordPress users often complain that their emails can’t make it to the user’s inboxes. This happens because of how WordPress handles email sending.

Here’s what happens when an email is sent from WordPress:

  1.  wp_mail() function is a part of the base programs of your WordPress files. Plugins uses the wp_mail() function to send emails to WordPress.
  2. WordPress sends your hosting provider’s server this email request and processes the request using PHP email.
  3. PHP finally instructs the mail server at the hosting provider. Finally, your hosts’ email router pushes the emails to their correct recipients.
How WordPress sends emails via PHP mailer or SMTP server

Many hosting providers do not have an email infrastructure, and many hosting servers block PHP emails by default. This is why you should never use WordPress for sending emails.

This article is for those who are struggling with the problem. Unfortunately, it’s a common yet frustrating issue for WordPress users—but also one that you can also fix quickly. The easiest way to define the solution is by replacing the PHP mailing system with an SMTP plugin.

The Simple Mail Transfer Protocol(SMTP) is the international standard communication protocol used for sending and receiving emails over the internet.

If your web hosting provider doesn’t have a hosting email facility on the server, you can use an SMTP plugin for sending WordPress emails reliably. SMTP plugins are relatively easy to install and use.

We recommend FluentSMTP, a free and open-source SMTP plugin for your WordPress. FluentSMTP can be paired up with Google Workspace for excellent email deliverability.

So let’s get to how you can send WordPress emails using Google Workspace!

Steps to send WordPress emails with Google Workspace SMTP

FluentSMTP can help you send emails using email sending services providers like Google Workspace(Gmail formerly named G-suit), Amazon SES, SendGrid, MailGun, SendInBlue, PepiPost, SparkPost, etc.

Let’s set up FluentSMTP with google workspace in 4 easy steps:

1. Install FluentSMTP

Installing FluentSMTP is pretty easy. To install FluentSMTP on your WordPress site:

  1. From your WordPress dashboard, hover over Plugins and click Add New.
how to add a plugin on WordPress

2. Search for FluentSMTP and click Install

Install FluentSMTP and activate it

3. Once installed, click activate. The plugin will be installed and activated.

2. Configure FluentSMTP with Google WorkSpace

After installing the plugin, you can configure FluentSMTP with your Gmail or Google Workspace account. Here’s how to do that easily:

  1. From your WordPress dashboard, hover over Settings and click FluentSMTP.
where to find fluentsmtp on your wordpress dashboard
  1. Here you will be asked to configure your first email service provider connection. Select Google Workspace as your email service provider to configure it with FluentSMTP.
setting up google workspace with fluentsmtp

3. At this point, you’ll have to configure the sender details such as From Email and From Name. Input your email address in the From email field and give a From Name of your choice. These will be used for sending emails from WordPress.

google workspace credentials in fluentsmtp

Lastly, you need to submit Application Client ID and Application Client Secret. Now, let’s see how we get this ID and secret from google workspace.

3. Getting Google Workspace API settings

In this part, you have to go through multiple processes; these are shown below:

Create a new API credential project in Google Cloud Platform

  1. Go to Google Cloud Platform by clicking on this link – From the dashboard, click on Select a project.
Select an API credential project in google cloud platform

2. A popup will appear; click on the NEW PROJECT button.

creating a new API credential project in google cloud platform

3. Give a Project name and hit on the CREATE button.

google cloud plaform project name and location

A notification will appear, which will confirm that a project has been created.

Now, if you have existing projects on your Google Cloud Platform, you need to select your newly created projects as default. To do that:

4. Click on the dropdown as shown in the screenshot.

google cloud platform project info

5. Select the newly created project; you can see a checkmark on the left side in the selected project’s name. Now select the project name and click ‘Open.’

selecting a project in google cloud platform

6. Now, click on the hamburger menu and scroll down to API & Services and click Library.

accessing api library in google cloud platform

7. From the API library, search for Gmail API and enable it.

google cloud platform api library
gmail api in google cloud platform library

8. After enabling Gmail API, scroll down to the OAuth consent screen on the left side of the window. Click on that, and a new page will show up. There are selection options for user type. Select External user type and click on CREATE.

OAuth consent in google cloud platform

9. This takes you to OAuth consent where you need to provide App information. Provide the App name and User support email in the app information section. You can also provide an app logo.

The user support email is the sender’s email address of your campaign.

setting up oauth consent in google cloud platform

10. Now scroll down to the app domain section. Here you need to provide your application home page, privacy policy, and terms and services page URL. Also, fill out the authorized domain name here.

setting up app domain for google oauth consent

And then, the final section is developer contact information. Input the developer email and click on SAVE AND CONTINUE button. And that’s it.

developer contact information for google oauth consent

11. For the scope section, you don’t have to add or remove anything. Simply SAVE AND CONTINUE.

google oauth consent scoopes

12. In the Test Users section, add the user email. It is the sender’s email for your campaign. You can add one or more email addresses to send emails to your users. Click on ADD USERS and provide your email address. Again, click Save and Continue.

creating a test user for google oauth consent
creating a test user for google oauth consent

13. In the next step, you’ll get to see the summary. If everything is in order, click on the BACK TO DASHBOARD button. Here you see an OAuth consent screen window like the picture below. You need to publish the app by clicking on the PUBLISH APP button.

Publish OAuth consent in google cloud console api service

Create OAuth client ID credentials

At this stage, you need to create OAuth client ID credentials. For that:

  1. Go to Credentials from the hamburger menu and click the Create Credentials>OAuth client ID.
google cloud platform credentials

You have to select the application type in the next screen and set a name for the client ID.

2. Select Desktop app as the Application type. Give a name for your OAuth client ID and hit the CREATE button.

Create OAuth client ID in google cloud console

3. You will be given a Client ID and a Client Secret on a popup window. Copy them by clicking the copy icon (at the right side).

Copy your OAuth client ID and Client secret

And that’s it! You’ve acquired both the Application Client ID and Application Client Secret.

So go back to FluentSMTP and input those on Google Workspace connection settings. then, click the Authenticate button to get access token.

Authenticate with Google & get Access token

4. Getting Google Workspace SMTP access token

In order to get an access token for setting up Google Workspace SMTP, you need to allow some access. Follow the steps to easily get your access token:

  1. When you click Authenticate with Google and Get Access Token, you’ll be asked to select your email address. Select the email address you want to proceed with.
choose Gmail account to authenticate Google Worksspace with FluentSMTP
  1. As your newly created app is a local app, google can’t verify it. Don’t worry about the notice; click on the Advanced option.
google app verification for FluentSMTP
  1. Click Go to connector (unsafe) option.
  2. Check the Manage Drafts and send emails option and confirm your choice by clicking Continue.
FluentSMTP security prompt for google workspace SMTP
  1. Copy the code by clicking on the copy button on the right side.
Copy access token given by Google

Now paste the code (that you just copied) in the Access Token box. And click on Save Connection Setting.

paste access token and save the connection settings for FluentSMTP

You are all done with setting up Gmail/google workspace with FluentSMTP. You should see it saved as below:

email on the FluentSMTP setup dashboard

Test email deliverability with Google Workspace SMTP settings

Email deliverability issue is always a top priority for email marketing. One of the common yet frustrating problems is WooCommerce emails not sending. So, now it’s time to check email deliverability from the email service provider you just added. The simplest way to test WordPress email deliverability is by using the FluentSMTP plugin. This tool allows you to quickly log and view all emails sent from WordPress.

To test whether your WordPress emails are working or not:

  1. Go to FluentSMTP and switch to the Settings tab.
  2. From the sidebar, enable email logging by checking Log all emails from reporting box. This will enable email logging.
enabling email logging in FluentSMTP
  1. Now click on the Test Email tab, and select the Google Workspace account you just created as the From email. For the Send To field, you can provide any email address of your choice. and click Send Test Email button to test email deliverability. Finally, click Send Test Email to send a test email.
sending a test email in FluentSMTP

You can check the inbox to see if the test email landed successfully.

ensure and testing email deliverability from the inbox

5. Finally, click on Email Logs from the upper bar. Here you can see you sent emails with the email addresses. There is also resend, view, and delete button if needed.

check email logs to check email deliverability from FluentSMTP email logs

That’s how you can check your email deliverability. If you receive an email in your mentioned email inbox and see your sent email in the email logs list, then congratulations, you’ve successfully configured FluentSMTP with Google Workspace!

Subscribe to Our Newsletter

Get our blog articles, tutorials, and information delivered to your inbox!

FSMTP Blog Update Feed

Ensure reliable email deliverability with Google Workspace SMTP!

FluentSMTP is a feature-rich and lightweight WordPress SMTP Plugin that is free and 100% open source. While Gmail is among the most reliable email client in the world. Combining these two tools, your WordPress emails will be sent reliably and securely.

We hope this article helped you easily configure Google Workspace SMTP on WordPress. If this article helped you, let us know in the comment section. Also, you can check how to send WordPress emails with Microsoft 365(office 365) account. Feel free to ask any questions!

Similar Posts

Latest comments (2)

Avatar for TESS