How to configure Gmail to send emails in Icegram Express?
In this documentation, we’ll show you how to set up Icegram Express Max using the Google Workspace / Gmail mailer with your Gmail or Google Workspace email address.
- Creating a Web App in Your Google Account
- Creating or Choosing a Project
- Enabling the Gmail API
- Creating Your Application’s Credentials
- Configuring Your OAuth Consent Screen
- Configuring Scopes (Optional)
- Setting Up Your OAuth Client ID
- Updating the Publishing Status From Testing to Production
- Granting Your Site Google / Gmail Permissions
- Sending a Test Email
- Updating the Publishing Status From Testing to Production
- Granting Your Site Google / Gmail Permissions
- Sending a Test Email
Creating a Web App in Your Google Account
In the new tab or window you’ve opened, log in to your Google account and open your Google Cloud Console.
Note: Before continuing, be sure to sign out of all other Google accounts besides the account you’ll be using for the SMTP setup.
Also, if you’re using Google Workspace, make sure that the Google account you use has permission to send emails (in other words, access to its own inbox).
If it’s your first time using 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.
If you’ve logged in to the Google Cloud Console before, you’ll likely bypass the Terms of Service.
Creating or Choosing a Project
First, you’ll need to choose a project to use for your app. You can select an existing one or create a new one.
To do so, click on the projects dropdown in the toolbar at the top of your dashboard.
In the popup that appears, select an existing project from the list or click on New Project in the top right corner.
If you selected an existing project, move on to the next step. For a new project, enter a project name and select an organization and location from the dropdowns.
Then click on the CREATE button.
Enabling the Gmail API
Next, you need to enable the Gmail API for your project. In your Google Cloud Console sidebar, go to APIs & Services » Library.
Then look under Category and click on Email, or enter “Gmail API” in the search bar.
Click on the Gmail API result.
On the Gmail API page, click on the blue Enable button.
Creating Your Application’s Credentials
After you enable the Gmail API, you should be redirected to the Gmail API Overview page. Here, click on the CREATE CREDENTIALS button.
On the next page, Google will ask a few questions to determine the Credential Type you need. From the Select an API dropdown, choose Gmail API.
Note: If you don’t see an option for the Gmail API in the dropdown, be sure that you have the Gmail API enabled for your account.
Next, under What data will you be accessing?, select the User data option. Then click the NEXT button to proceed.
Configuring Your OAuth Consent Screen
Google will then ask for some basic information about your app.
This section is mostly for personal use since no one else will be using your app. However, some fields are still marked as required:
App name: Enter an app name of your choice (e.g., Pattie’s App).
User support email: Select your email address from the choices provided.
App logo: If you’d like, you can upload a logo for your app. This is optional.
Entering app information in Google Cloud
Finally, add your email address in the Email addresses field. Then click on the SAVE AND CONTINUE button to proceed to the next step.
Configuring Scopes (Optional)
This is an optional step that we will be skipping for this tutorial. Scroll down to the end of the Scopes section and click on the SAVE AND CONTINUE button to proceed.
Note: For more information on Gmail API scopes, please see Google’s developer documentation.
Setting Up Your OAuth Client ID
Next, you’ll need to fill out some information about your OAuth Client ID.
From the Application type dropdown, select the Web application option. Once you do so, more fields will automatically populate.
You can leave the Name field as the default value or change it to something more relevant. For this example, we’ll keep the default name, Web client 1.
Next, skip the Authorized JavaScript origins section and scroll to Authorized redirect URIs.
Click on the + ADD URI button and input the following: (https://sitedomain/wp-admin/admin.php?page=es_settings). You can also copy this value from your Gmail mailer settings and paste it here if you prefer.
Then click on the CREATE button to complete this step.
Once your app has been created, the Your Credentials section will expand to show you your Client ID. There’s no need to copy it now, as you’ll access it from another area in a later step.
Instead, go ahead and click the DONE button at the bottom of the page.
Updating the Publishing Status From Testing to Production
Google will put your app into Internal mode by default. It’s really important that you switch it to External mode and publish it. Otherwise, your app will be super limited and won’t function properly.
In your Google Cloud Console sidebar, go to APIs & Services » OAuth consent screen. Under User Type, click on the Make External button.
Clicking the MAKE EXTERNAL button to change the publishing status of a Google Cloud app
In the popup window that appears, select the In production option. Then click on CONFIRM.
Once confirmation is complete, you’ll see that your app’s Publishing status is now In production.
Granting Your Site Google / Gmail Permissions
Next, click on Credentials in the left side menu.
Once you’re on the Credentials page, in the OAuth 2.0 Client IDs section you can see the details of the web application you just created. To view the Client ID and Client Secret, click the pencil icon.
Click pencil icon
This will open all of the details for your app. On the right side of this page, you’ll see the Client ID and Client secret values.
Client ID and client secret
Go ahead and copy both of these values into the corresponding fields in your ES -> settings -> Email Sending.
Pasting your Client ID and Client Secret in the Google / Gmail mailer settings
Note: Be very careful not to copy any extra text or spaces with your Client ID or Client Secret, as this will result in an error in the next step.
Once you’ve added these values, click the Save Settings button at the bottom of the page.
After saving your settings, the page will refresh. You must grant permission before Google allows our plugin to use your Gmail API to send emails.
To do this, scroll to the bottom of the ES -> settings -> Email Sending tab and click the button labeled “Authorize ES plugin to send emails using your Gmail”.
This will open a login screen for Google. Go ahead and log in to the account you’re setting up SMTP with.
Next, you’ll see a screen asking for permission for this site to send emails on your behalf.
When you’re ready, click the Allow button to proceed.
Allowing your site to send emails from your Google account
Bypassing Google’s Verification Warning (Free Gmail Users Only) If you are connecting with a free Gmail account you might see the following screen. Go ahead and click on the Advanced link in the bottom left corner.
In the expanded section, click on “Go to Your-Project-name” Don’t worry, Google only displays this warning because it hasn’t verified your app. There is no need to verify it since you created this app just for your own use.
Then click on the Allow button as shown above.