Get GoSMTP
Home » Google Workspace / Gmail (Pro)
Google Workspace / Gmail (Pro)

Introduction

Do you want to use your Gmail or Google Workspace account to resolve email delivery issues on your website? With the GoSMTP plugin, you can securely authenticate your site's emails using Google's API, ensuring successful delivery to your users' inboxes. Google is widely recognized as one of the top email delivery methods available. Whether you have a free Gmail account or a paid Google Workspace (formerly GSuite) subscription, you can easily configure it with GoSMTP.


This tutorial will guide you through the process of setting up GoSMTP with your Gmail or Google Workspace email address.

Installing & Configuration with Goggle workplace

To begin, make sure you have installed and activated the GOSMTP plugin.

After verifying your license, you can easily configure the plugin's settings. Just Go to GOSMTP » Settings in your WordPress dashboard and navigate to the SMTP Settings tab.
gosmtp_smtp_settings_tab
To get started, follow these steps to configure the GO SMTP plugin in WordPress:

Basic configuration

  • From Email:  Set the email address which is used for sending all emails from your website.
  • Force From Email: Enable force from email, It ignores emails set by other plugins and use the Form Email setting.
  • From Name: Set the from name from which emails are sent. By default, your site name is set as form name.
  • Force From Name: Enable force from, It ignores from name set by other plugins and use the Form Name setting.
  • Mailer: Select Gmail option from the Mailer field.
gmail_basic_configuration
After selecting the Google workplace, you'll see a new section called Google / Gmail. Within this section, you'll find settings called Client ID and Client Secret.
gmail_mailer_cofiguration
To obtain the necessary information for these fields, you'll need to create a web application using your Google account. Don't worry, no coding is required, and we'll guide you through the process in the next step.
Keep in mind that you'll return to the GoSMTP settings page later on, so in the next step, open a new tab or window in your browser.

Obtain Google Cloud Application Client ID & Client Secret

Here's a step-by-step guide on how to obtain the Client ID and Client Secret key from Google Workspace Gmail:
  • Navigate to the Google Cloud Platform Project

Go to the Google Cloud Console: Visit the Google Cloud Console at console.cloud.google.com.
gmail_console_page
  • Create a new project

If you don't have a project already, create a new one by clicking on the project drop-down menu at the top and selecting "New Project."
gmail_create_new_project
Give your project a name and click "Create."
gmail_add_project name
  • Enable the Gmail API

In the left navigation menu, click on "APIs & Services" and then select "Library."
gmail_enable_api_tab
Search for "Gmail API" and click on it.
gmail_search_gmail_api
On the Gmail API page, click the "Enable" button.
gmail_enable_gmail_api
  • Configuring Your OAuth Consent Screen

Enabling the Gmail API is a quick process that only takes a few seconds. Once enabled, you will be redirected to the Gmail API Dashboard. Next, click on "Credentials" in the left navigation menu under "APIs & Services." On the Credentials page, click on the "+ Create Credentials" button and select "OAuth client ID" from the drop-down menu.
gmail_credential page
If the Consent screen is not configured, you will see a "Configure Consent Screen" button. Simply click on it.
gmail_configugure_consent_screen
You will now be redirected to the OAuth consent screen page. If you don't want your credentials to be used by anyone, you can select the "External" option on the Google Consent Screen. This ensures that your credentials are not accessible to others and helps maintain the security of your application.
gmail_internal_external_page
For the OAuth Consent Screen, provide the following information:
App Name:
Name for the App.
User support email:
Support email address.
App logo: If you have an app logo, you can upload it here.
Developer contact information: Developer's contact email.
These email addresses will be used as the Email Address for delivering emails from WordPress using the GoSMTP plugin. After entering the required information, click on "Save and Continue."
gmail_app_information
gmail_developer_contact_info
For GOSMTP, there is no need to make any changes to the SCOPES options. However, if you have specific requirements, you have the flexibility to configure them accordingly and click on "Save and Continue".
gmail_scope
If you want to create a test user, you can easily do so on the OAuth consent screen page. Simply click on the "Add User" button and then click "Save and Continue." otherwise no need to create user just click "Save and Continue." This allows you to include a test user for your application's consent screen.
gmail_test_user
After filling in the information on the OAuth consent screen, you will see a summary of the details you provided. To return to the dashboard, simply click the "Back to Dashboard" button. This will take you back to the main dashboard where you can continue with the next steps.
gmail_app_registration_last_page
  • Setting Up Your OAuth Client ID

Now again click on "Credentials" in the left navigation menu under "APIs & Services." On the Credentials page, click on the "+ Create Credentials" button and select "OAuth client ID" from the drop-down menu.
gmail_credential page
Now you will see OAuth client ID page, For the OAuth client ID, provide the following information:

Application Type: Select "Web application" as the application type.
Name:
Enter a name for your OAuth client ID in the "Name" field. This can be any descriptive name that helps you identify the purpose of the credentials.
Authorised JavaScript origins 
(You can skip the Authorized JavaScript origins section): Configure authorized JavaScript origins: In the "Authorized JavaScript origins" section, you need to specify the URLs that are allowed to make requests to your Gmail API. Enter the URL of your website or application in this field. If you are testing the API locally, you can enter "http://localhost:YOUR_PORT_NUMBER" as the origin.

Authorised Redirect URL: To add a Redirect URL, click on the "+ ADD URI" button. Copy the Redirect URL from your GoSMTP SMTP settings and paste it in the provided field and click on "Create".

gmail_application_type
Next, you'll receive a Client ID and Client Secret as credentials. You can choose to skip copying them or I can copy them for you. Simply click "OK" since we have already created the credentials for GoSMTP, which we will collect later in this tutorial.
gmail_copy_credenial
  • Publish OAth App

To publish the app you have created, go to the OAuth Consent Screen section in the left sidebar. You will find your GOSMTP app listed there. Click on "PUBLISH APP" located under the Testing section.
gmail_pulish_app
Click on confirm.
gmail_pulish_confirm_popup
  • Publish OAth App

To collect the required credentials, go to the Credentials section in the left sidebar. Look for the Project Name you created, which is "GOSMTP," and click on the Edit icon located on the right side.
gmail_cread_info_page
On the right side, you will find the Client ID and Client Secret displayed. Simply copy these two values and paste them into the GOSMTP SMTP settings in the upcoming steps.
gosmtp_last_cred_page

Mailer configuration

  • Save credentials

In the Google Workplace SMTP settings, enter the Client ID and Client Secret that you coppied earlier from the previous steps and click on save changes.
gmail_add_credential
  • Authorize Google API

Once you save your settings, the page will refresh, and you'll see a "Get Access Token" button below the client secret. It is essential to grant permission before Google allows our plugin to use your Gmail API for sending emails.

To grant permission, simply scroll to the bottom of the GOSMTP settings page and click the "Get Access Token" button.
gmail_get_access_token
After clicking the "Get Access Token" button, a login screen for Google will appear. Log in to the account you are setting up SMTP with.
gmai_select_account
  • Accept Google warnings

If you are connecting with a free Gmail account, you may encounter the following screen. Click on the "Advanced" link in the bottom left corner.
gmail_google_warning
In the expanded section, click on "Go to GoSMTP (unsafe)." Rest assured, Google shows this warning because it hasn't verified your app. However, there's no need for verification as you created this app solely for your personal use.
gmail_after_click_advance
Next, you will see an approval window to grant your project access to user information from the Google Cloud Project. Simply click on "Continue" to proceed to the next step.
gmail_complete_setup
You will now receive a "Token Updated Successfully" prompt, indicating that you can now use Google Workspace for sending emails.
gmail_success_promt
To deactivate your token in the future, just click on the "Deactivate Access Token" option on the screen below.
gmail_succesfully_configured

Send test Mail

After successfully configuring the mail settings, it's time to test your email functionality. Send a test email to verify whether it will be delivered successfully or encounter any issues. This test will determine whether your mail setup is functioning properly.

Freqently Asked Question

What are the benefits of integrating Google Workplace API with GoSMTP?
Sending a test email allows you to verify that your email configuration is set up correctly. It ensures that your emails will be delivered successfully and helps identify any issues before sending emails to your recipients.
What should I check after sending a test email?
After sending a test email, check the recipient's inbox for the email. Verify that the subject, body, and any attachments, if included, appear as intended. This helps ensure that the test email was delivered successfully and displays correctly in the recipient's email client.
What if the test email is not received?
If the test email is not received, double-check the recipient's email address and ensure it is valid. Also, review your GoSMTP settings and email configuration for any errors or misconfigurations. If the issue persists, consider checking your spam or junk folders, or contact your email provider for further assistance.
Can I send multiple test emails?
Yes, you can send multiple test emails using GoSMTP. Simply repeat the steps mentioned earlier to send additional test emails, ensuring that each test email is customized as desired.
What if the test email encounters errors or delivery issues?
If you encounter errors or delivery issues with the test email, review your GoSMTP settings, double-check your email configuration, and ensure that all the necessary details are correctly entered. Additionally, consult the GoSMTP documentation or seek support for troubleshooting assistance.
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list