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](https://docs.gravitysmtp.com/wp-content/uploads/2024/02/image-2.png)
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:
- Create a Google account (you can skip this step if you already have an account.)
- 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. - 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. - 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. - 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. - 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.
![](https://docs.gravitysmtp.com/wp-content/uploads/2024/06/image-18.png)
- 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.
![](https://docs.gravitysmtp.com/wp-content/uploads/2024/06/xnap-2024-06-11-10.30.07-5998D9A0-A8F7-4DDB-9494-8E58B0DE6B8D-1.png)
- 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.](https://docs.gravitysmtp.com/wp-content/uploads/2023/11/not.png)
- 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.](https://docs.gravitysmtp.com/wp-content/uploads/2023/11/yes.png)
Google / Gmail Settings Reference
App Configuration
![Google / Gmail Settings](https://docs.gravitysmtp.com/wp-content/uploads/2024/06/image-8.png)
Tag | Description |
---|---|
Client ID | The 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 Secret | The 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 URI | The 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.](https://docs.gravitysmtp.com/wp-content/uploads/2024/02/image-1-1024x621.png)
Tag | Description |
---|---|
From Email | The 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 Email | If enabled, the From Email will override any plugin settings for all outgoing email messages. |
From Name | The from: name associated with outgoing messages. Only applied when from: property is not explicitly set in the message being processed. |
Force Name | If enabled, the From Name will override any plugin settings for all outgoing email messages. |