Registering Application in Google Cloud Console
If you want to use your own web application for email notifications, you need to configure it in the Google Cloud console. To do this, perform the following steps:
- Log in to the Google Cloud console under a Google account that has permissions to create applications.
- Create a new project and enable Gmail API for the project. To do this, open APIs and services > Library > Gmail API > Manage and click Enable API.
- Create OAuth credentials. To do this, perform the following steps:
- Open APIs and services > Credentials. Click Create credentials and select OAuth client ID.
- In the Application type field, select Desktop app.
- In the Name field, specify the name of your OAuth 2.0 client.
- Click Create to generate the application client ID and the client secret. In the opened window, you can copy credentials or download them in the JSON format. You can also find them later in the APIs and services > Credentials section when editing your OAuth 2.0 client ID.
- Open APIs and services > OAuth consent screen and click Edit App. Specify your application name and the user support email and click Save and continue.
- If your application is in the Testing status, you must specify test users. To do this, at the Test users step of the Edit App wizard, click Add users. To apply changes, click Save and continue. Note that only test users will have access to the app.
After you finish the registration, specify custom application registration settings when configuring the mail server for Google Gmail OAuth 2.0 authentication. For more information, see Gmail Server Settings.
You can leave your application in the Testing status and do not publish it. In that case, you will receive a warning message Google hasn't verified this app when connecting to your application. If you want to verify it, see this Google article.