Comment on page
How to Connect Gmail
Connecting Google's SMTP is quite easy and you can either connect your Gmail or G Suite account for this case and by following just these 5 steps below, you'll accomplish this integration:
- 1.Create a Web App in your Google account
- 2.Configure your OAuth Consent Screen
- 3.Set up your OAuth Client ID
- 4.Updating the Publishing Status From Testing to Production
- 5.Create, copy and integrate Google's SMTP
First of all, you need to open a new tab and log in your Gmail account or the G Suite account to access your inbox, then visit the Google console website to enable the Gmail API, you can click here to access the direct link to that application page.
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.
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 location from the dropdowns. Then click on the CREATE button.
Next, you need to enable the Gmail API for your project. Choose APIs & services > Library from the left side menu
Choose Gmail API and click on blue ENABLE button.
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 screen, you'll have to answer some questions, just leave them as you see below, then click the NEXT button to proceed.
Here, Gmail will then ask for some basic information about your app, fill the data as in our sample below. Then click on the SAVE AND CONTINUE button to proceed to the next step.
The next screen will require you to set the Scopes (Optional), but leave as it is, just click Save and Continue .
You'll need to fill out some information about your OAuth Client ID.
From the Application type dropdown, select the Web application option, then giving a name or leave at default Web client 1.
Click on the + ADD URI button and input the following, Authorized redirect URLs should contain the automatically generated URL in your site settings.
You'll see the settings when you go back to the YaySMTP settings screen in your website and make sure you click "enter" button to add it too. Then click on the CREATE button to complete this step.
After that, the Credentials will expand to show you your Client ID. Go ahead and click the DONE button.
In your Google Cloud Console sidebar, go to APIs & Services > OAuth consent screen. Under Publishing status, click on the PUBLISH APP button.
In the popup window that appears, click on CONFIRM.
Once confirmation is complete, you’ll see that your app’s Publishing status is now In production.
Click on Credentials in the left side menu, you will see the details of web application you just created in the OAuth 2.0 Client IDs.
Then, click the pencil icon to open all of the details, to edit and copy your credential values including Client ID and Client Secret (Client Secret is the API Key in YaySMTP settings)
Add them to the appropriate settings fields of YaySMTP on your website, click "Save Changes".
When change is saved successfully, click on "Confirm Authorization" button to authorize the Google app.
This will open a login screen for Google. Go ahead and log in to the account you’re setting up SMTP with, then click the Allow button to proceed.
Bypassing Google’s Verification Warning (Free Gmail Users Only)
You might see the following screen if you are connecting with a free Gmail account. Go ahead and click on the Advanced link in the bottom left corner.
In the expanded section, click on Go to (your domain) (unsafe).
Then Click on Continue to complete Settings.