You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for GitLab's native Microsoft Graph Mailer to send emails via the Microsoft Graph API with OAuth 2.0 client credentials, as an alternative to SMTP. This addresses the deprecation of basic auth for SMTP AUTH on Exchange Online.
Closes#3239
Copy file name to clipboardExpand all lines: README.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -437,6 +437,26 @@ docker run --name gitlab -d \
437
437
438
438
Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of SMTP parameters that can be specified.
439
439
440
+
##### Microsoft Graph Mailer
441
+
442
+
As Microsoft is retiring basic authentication for SMTP AUTH on Exchange Online, mail delivery via SMTP using a Microsoft 365 mailbox is no longer viable for many tenants. The image supports GitLab's native Microsoft Graph Mailer, which sends emails via the Microsoft Graph API using OAuth 2.0 client credentials.
443
+
444
+
To enable it, register an application in Azure AD, grant it the `Mail.Send`**Application** permission (not Delegated), and have an administrator consent to it. Then start the container with:
`MICROSOFT_GRAPH_MAILER_USER_ID` is the Object ID of the Microsoft 365 user whose mailbox will be used, and `GITLAB_EMAIL` must be that user's primary email address. `SMTP_ENABLED` should stay at its default (`false`) when Graph Mailer is used. Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of Microsoft Graph Mailer parameters that can be specified.
459
+
440
460
##### Reply by email
441
461
442
462
Since version `8.0.0` GitLab adds support for commenting on issues by replying to emails.
@@ -2019,6 +2039,34 @@ Specify the `ca_path` parameter for SMTP email configuration. Defaults to `/home
2019
2039
2020
2040
Specify the `ca_file` parameter for SMTP email configuration. Defaults to `/home/git/data/certs/ca.crt`.
2021
2041
2042
+
##### `MICROSOFT_GRAPH_MAILER_ENABLED`
2043
+
2044
+
Enable mail delivery via Microsoft Graph API. Defaults to `false`. When enabled, emails are sent using OAuth 2.0 client credentials via the Microsoft Graph `sendMail` endpoint instead of SMTP. Requires an Azure App Registration with the `Mail.Send` Application permission granted and admin-consented. When both `SMTP_ENABLED` and `MICROSOFT_GRAPH_MAILER_ENABLED` are `false`, GitLab mail delivery is disabled.
2045
+
2046
+
##### `MICROSOFT_GRAPH_MAILER_USER_ID`
2047
+
2048
+
The Object ID (GUID) of the Microsoft 365 user to send mail as. This must match the user whose mailbox the emails are sent from. `GITLAB_EMAIL` should match the primary email address of this user.
2049
+
2050
+
##### `MICROSOFT_GRAPH_MAILER_TENANT`
2051
+
2052
+
The Azure AD tenant ID (GUID) or tenant domain (e.g. `contoso.onmicrosoft.com`).
2053
+
2054
+
##### `MICROSOFT_GRAPH_MAILER_CLIENT_ID`
2055
+
2056
+
The Application (client) ID from the Azure App Registration.
2057
+
2058
+
##### `MICROSOFT_GRAPH_MAILER_CLIENT_SECRET`
2059
+
2060
+
The client secret value from the Azure App Registration.
2061
+
2062
+
##### `MICROSOFT_GRAPH_MAILER_AZURE_AD_ENDPOINT`
2063
+
2064
+
Azure AD authority endpoint used to obtain an access token. Defaults to `https://login.microsoftonline.com`. Override for sovereign clouds (e.g. `https://login.microsoftonline.us` for Azure Government).
2065
+
2066
+
##### `MICROSOFT_GRAPH_MAILER_GRAPH_ENDPOINT`
2067
+
2068
+
Microsoft Graph API endpoint. Defaults to `https://graph.microsoft.com`. Override for sovereign clouds (e.g. `https://graph.microsoft.us` for Azure Government).
2069
+
2022
2070
##### `IMAP_ENABLED`
2023
2071
2024
2072
Enable mail delivery via IMAP. Defaults to `true` if `IMAP_USER` is defined, else defaults to `false`.
0 commit comments