Introduction
In order for Gravity SMTP to send messages from your Google / Gmail account, you will need to create an application in Google Cloud Console and provide the plugin with a token. You must complete this step before configuring the Google / Gmail Integration within Gravity SMTP. This article outlines steps for creating a web app in your Google Cloud Console.
Prerequisites
- A Google Cloud Console account with:
Step 1: Create a Project
- Visit Google Cloud Console: Open your browser and go to Google Cloud Console.
- Create or Select a Project: Click on the project dropdown menu in the top navigation bar. You can create a new project or select an existing one.
- Switch to the Preferred Project: Once the project is created or selected, ensure it’s active by selecting it from the dropdown menu.
Step 2: Enable the Gmail API
- Navigate to APIs & Services: In the Google Cloud Console, go to the “APIs & Services” section and click on “Library.”
- Search for Gmail API: Type “Gmail API” in the search bar and select it from the search results.
- Enable the API: Click the “Enable” button to activate the Gmail API for your project.
Step 3: OAuth2 – App Registration
- Go to OAuth Consent Screen: In the Cloud Console, navigate to “APIs & Services” and “OAuth Consent Screen.”
- Create an External Application: Select “External” and click “Create.”
- Enter App Details: Provide your app name, select a user support email, and enter the developer’s contact email.
- Save and Continue: Complete this setup by clicking “Save and Continue.”
Step 4: OAuth2 – Scopes Setup
- Scope Configuration: You can leave the defaults unchanged on the Scopes setup page.
- Save and Continue: Proceed by clicking “Save and Continue.”
Step 5: Set Up OAuth2 Credentials
- Navigate to Credentials: Go to “APIs & Services” > “Credentials” in the Cloud Console.
- Create OAuth Client ID: Click the “Create credentials” dropdown and select “OAuth client ID.”
- Choose Application Type: Select “Web application” as the application type, regardless of your application type.
- Enter Client Details: Provide a name for your OAuth client and add an Authorized Redirect URI. You will use the one provided by Gravity SMTP in the Google / Gmail connection settings.
- Create the Client: Click “Create” to generate your OAuth credentials.
Step 6: Obtain your Client ID and Client Secret
View Credentials: After creating the OAuth client, Google will provide you with a client ID and client secret. Save these for future use.
Step 7: Publish your App
Now, you will need to publish your App: In the Cloud Console, navigate to the “APIs & Services” > “OAuth Consent Screen” section. Under Publishing status, ensure that the Publishing status is set to In Production.