Oauth SMTP Google#
Creating a project#
- From your Google console (administrator access is required), go to your
organisation
thennew project
- Enter the name of your project
- Click on
create
- Return to your organisation,
- Select your project
Setting up Oauth access#
- From the
menu, click on
APIs & Services
. - Then
OAuth consent screen
.
- select the type of access that will be granted to the application (internal or external users)
- Then click on
create
.
- Enter (as a minimum) a name for the application, an email address for application support and the developer's email address (this information is compulsory).
-
Click on
save and continue
. -
In the
scope
section, click onadd or remove scopes
. - Add
auth/userinfo.email
auth/userinfo.profile
andopenid
.
- Click on
update
- Then
save and continue
ID settings#
- From the
credentials
menu, click oncreate credentials
thenOauth client ID
.
- Select the type of application "web application
".
- Enter an application name,
- In the authorized redirect URL
section, enter the GLPI callback URL
.
-
Click on
create
-
A page appears with the username values. Keep this information as it will be requested in GLPI.
Setting up GLPI#
- From
setup
>notifications
>configuration of email notifications
- Select
SMTP + OAUTH
- Select
Google
and enter the information requested, using the screenshot above as a guide
Additional information :
Fields | Values |
---|---|
SMTP Host |
smtp.gmail.com |
Port |
587 |
Email sender |
If empty, the value will be email sender address . If the value is different from sender's email, your configuration will fail, the 2 values must be identical |
- Click on
save
You will be asked for a Gmail account, and you will then need to accept the necessary authorisations.
Recommendation
It is preferable that the OAUth SMTP account is also the one indicated in sender email
so that emails are sent from the correct mailbox.
Run a test send to make sure your SMTP configuration is working properly.