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 4 steps, you'll accomplish this integration:
  1. 1.
    Create a Web App in your Google account
  2. 2.
    Set up OAuth Consent Screen
  3. 3.
    Configure your OAuth Client ID
  4. 4.
    Create, copy and integrate Google's SMTP

Create a Web App in Your Google Account

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 which will take you to the form called Register your application for Gmail API in Google API Console. Leave the default option "Create a project" and click Continue. The API would now be enabled, click go Go to credentials.
On the next screen, you'll have to answer some questions, just leave them as you see below:
Note: If you don't see the Gmail API in that dropdown, make sure you click and open in a new tab the APIs & services from the left side menu, and then select Library, click the API you want to enable and go back to the screen, refresh it so that the G Suite will be added in the dropdown.
Then click the button " What credentials do I need?" to continue and a pop up will come up, click " Set Up Consent Screen" which will open in a new tab (do not close the first tab, leave it open as you'd need it again).
Set up OAuth Consent Screen
Here, if you are using G Suite account, you’ll first set User type to Internal, but Gmail account will only allow you to choose External, then click Create button. In the next screen, fill the datas as in our sample below:
When you are done filling this details, click Save and Continue, the next screen will require you to set the scopes, but leave as it is, just click Save and Continue and now you will see the summary of your settings, ignore this, then revisit the previous tab.
Configure Your OAuth Client ID
In this previous tab, you need to fill those fields, including giving a name or leave at default Web client 1, Authorized JavaScript Origin field should contain your website URL and make sure you click "enter" button to add it, 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.
After that, click on "refresh" and wait for it to generate the Create OAuth client ID button.
Create, copy and integrate Google's SMTP
Click this Create OAuth client ID button and on the next screen, click "I'll do this later".
This will redirect you to the full OAuth screen, click the pencil icon to edit and copy your credential values including Client ID and Client Secret.
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, keep clicking on "Allow" button until the authorization process is completed.
An image showing the Google's dialogue screen while authenticating Google App
Copy link