Fluent SMTP is a plugin that takeover WordPress’s default mailing system and ensures email delivery from the website and also keeps logs of them. The unique feature of Fluent SMTP is that it can be configured with multiple email delivery methods(connections) and all of them can be used later by configuring the Mail From address.
Google is one of the best email delivery methods available in the market. Both Free and Paid (Google Workspace formerly known as GSuite) emails can be configured with Fluent SMTP. In this tutorial, we are going to configure Fluent SMTP with Google.
The steps are below:
- Installing and activating the Fluent SMTP plugin.
- Creating Web Application with ClientID and Client Secret.
- Generating Access token for Fluent SMTP.
- Sending Test Email.
Installing and activating the Fluent SMTP plugin #
To get started we need to install and activate the Fluent SMTP plugin. The easiest way is to install it from WordPress Admin Dashboard. Go to Plugins > Add New: Search for “Fluent SMTP” and then Install and Activate the plugin as below screenshot.
Now we are ready to configure Fluent SMTP to send emails from our website through Google. Please follow the below steps as instructed.
Creating Web Application with a Client ID and Client Secret. #
To create credentials please go to Google Cloud Console Dashboard.
On the first time accessing Google Cloud Console, you may see a popup asking you to select your country and agree to the Terms of Service. Go ahead and do so, then click on AGREE AND CONTINUE to move on to the next step.
Then we need to create a Project for Fluent SMTP. The option for creating a new project can be found in the top left corner under Select a Project or the top right corner from the Dashboard section with CREATE PROJECT.
At this step, we need to give a name for the project. Here, “FluentSMTP” is used as the name, and “No Organization” for the Location is used.
After creating the Project google will redirect us to the project dashboard. Now we need to Enable the GMAIL API for the project. We can find the option for enabling API & Services from APIs &Services > Enabled API & Services from the left sidebar as the below screenshot.
From the APIs & Services dashboard now we need to click on ENABLE APIS & SERVICES.
In the search bar search for “Gmail API“
This will list the GMAIL-related API services. We just need the Gmail API. Now click on the Gmail API and it will take us to the Gmail API page.
Now we need to Enable the API by clicking on the ENABLE button as below.
It takes a few seconds to enable the API and then redirect us to the GMAIL API Dashboard as below. This time we need to create the credentials for Fluent SMTP by clicking on CREATE CREDENTIALS.
For Credential Type, we need to select the USER DATA as the target accessible data and GMAIL API as the target GMAIL API that is selected by default.
Now for OAuth Consent Screen, Give a name for the App Name, an email address for the support email, and also an email for the developer’s contact information. The email addresses are used as the Email Address we will be used to deliver emails from WordPress using Fluent SMTP plugin. Once the inputs are done click on SAVE AND CONTINUE.
For Fluent SMTP email delivery, we do not need to do anything for SCOPES options. You can still configure your own requirements if you need to.
Now for OAuth Client ID, we need to select the Application Type as Web Application.
We need to add an Authorized Redirect URI as below with the URL: https://fluentsmtp.com/gapi/
In the next step, we will be offered a Client ID as a credential. We can skip downloading or saving it as of now and click on DONE as we just finished creating the credentials for Fluent SMTP which we will collect later in this tutorial.
Now we need to publish the app we just created. Go to OAuth Consent Screen from the left sidebar and we will find our app FluentSMTP there. Now click on the PUBLISH APP right under the Testing section.
When asked to confirm, Please click on CONFIRM from Pust to Production popup window.
Now we will collect the credentials we need. Go to Credentials from the left sidebar. Find the Project Name we created as “FluentSMTP” and click on the Edit icon from the right side as below.
Now the Client ID and Client Secret will be shown on the right side. We need to copy these 2 values and put them into Fluent SMTP Connection settings in the next steps.
Generating Access token for Fluent SMTP #
Now from our website, Go to Settings > Fluent SMTP. If no other connections are created yet we will be offered the below options. We need to select Google Workspace from the available options as the connection method.
From Sender Settings, set the From Email as the Gmail or Google Workspace Email address. The “Set the return-path to match the From Email” means that the undeliverable emails will be returned to this exact email address if any bounces occur. Give a From Name as you wish. Forcing the sender’s name will force the name of the sender shown in the recipient’s email client.
Now we need to put the Client ID and Client Secret as we created and collected earlier in the previous steps. Now click on the “Authenticate with Google & Get Access Token”.
This will redirect us to the Fluent SMTP server and in the process, Google will ask for the account that you want to allow access to your Gmail or Google Workspace account.
This will take us to Fluent SMTP Server and provide us with a generated Access Token. Click on Copy to copy the access token that we need in the next step.
Now we are in the last step to configure our Fluent SMTP with the Google Workspace or Gmail Email address. Input the copied access token from the earlier step in the Fluent SMTP connection setting and then Save the connection.
Sending Test Email #
We are done configuring all the steps. Now it’s time to test the email delivery. Go to Email Test from the Fluent SMTP Dashboard. Then input the From as the configured email address and Send To as the recipient email address where the test email will be sent as below.
If all the steps are taken correctly and details are correct then the test email will be sent successfully and a screen like the below will appear.
From the recipient’s inbox, the email will be shown below.
An email with a notice indicating that the FluentSMTP app we created was granted access to the Gmail or Google Workspace Email will be sent to the email address. Don’t worry about this. It’s just a notification about the activity.
So all are set and enjoy the Fluent SMTP plugin to send all your WordPress Emails without any more hassle!