Connecting to Google / Gmail

Introduction

This article guides you through the process of integrating Gravity SMTP with your Google / Gmail account. This will allow your website to use Google’s API to generate secure authentication for your site’s outgoing email.

Image showing Google / Gmail integration card

About The Google / Gmail Service

Google provides Gmail accounts and offers a paid account option for businesses and schools, as well as a free trial account. Free trial accounts come with sending and recipient limits and are restricted to a few weeks in duration.

Caveats

Gmail accounts are not appropriate for website-critical email functions.

Gmail accounts (and many other free mail solutions) come with outgoing volume limitations, which may change without notice. This service may be sufficient to trial for websites with small or moderate outgoing email requirements or perhaps for notification needs for the site owner or webmaster only.

We suggest using services built specifically for transactional email sending, including time-sensitive delivery, critical for reception, or high volume or frequency, such as the other services integrated with Gravity SMTP.

For additional details on Google’s Workspace sending limits, refer to their documentation.

Integration Steps

To allow Gravity SMTP to send messages from your website via Google’s API, you will need to complete the following steps:

  1. Create a Google account (you can skip this step if you already have an account.)
  2. Obtain your Client ID.
    This will be required in settings to create the link between Google / Gmail and your website via Gravity SMTP. Refer to this help guide for instructions on how to find that Client ID key in your Google account.
  3. Obtain your Client Secret.
    This will be required in settings to create the link between Google / Gmail and your website via Gravity SMTP. Refer to this help guide for instructions on how to find that Client Secret key in your Google account.
  4. Complete the Gravity SMTP Settings screen.
    Go to Gravity SMTP → Settings → Integrations and click the settings cog on the Google / Gmail card. This will open a pop-up modal with all the fields required for SMTP to connect with Google / Gmail. See below for a description of these settings.
  5. Add Authorized Redirect URI to the Google Cloud app.
    This is an essential part of the OAuth 2.0 authentication process and is used to handle the response from the authentication server. See below for a description of the Redirect URI.
  6. Authorize the client via OAuth to use the app.
    You are now ready to sign in with Google. Click the button and follow the instructions to sign in with an email account that has been authorized to use the app.
  1. Complete the Gravity SMTP Settings screen again.
    You should be returned to the Google / Gmail settings screen, showing that you are connected. Complete any additional integration settings. See below for a description of these settings.
  1. Click the “Save Changes” button.
    You should be returned to the Settings card page after saving, and the Configured text should show at the bottom of the settings card for Google / Gmail. If your settings card still shows Not Configured, check your settings and the steps above to ensure everything has been completed.
Image showing that the connection is configured.
  1. Enable the integration using the on-off toggle (if you are ready to use it).
    Click the toggle on the settings card to turn on the Google / Gmail integration. This will show the integration as Connected. You can then test using the Gravity SMTP Tools to send a test email. Note that only one integration can be active at a time, so toggling one integration on will toggle any other active integration off.
Image showing that the connection is cinnected.

Google / Gmail Settings Reference

App Configuration

Google / Gmail Settings
TagDescription
Client IDThe Client ID provided by Google that is used to authenticate with the Google / Gmail API. See the “Steps” section for the process of obtaining this. Required.
Client SecretThe Client Secret provided by Google that is used to authenticate with the Google / Gmail API. See the “Steps” section for the process on obtaining this. Required.
Authorized Redirect URIThe Client Secret provided by Azure that is used to authenticate with the Google / Gmail API. See the “Steps” section for the process of obtaining this. Required.

Integration Settings

Image showing integration settings for Google / Gmail after the connection was made.
TagDescription
From EmailThe from: email associated with outgoing messages. This email address needs to be the connected account address or an existing alias on that account.
Only applied when from: property is not explicitly set in the message being processed.
Force EmailIf enabled, the From Email will override any plugin settings for all outgoing email messages.
From NameThe from: name associated with outgoing messages.
Only applied when from: property is not explicitly set in the message being processed.
Force NameIf enabled, the From Name will override any plugin settings for all outgoing email messages.