Skip to content

Add Microsoft Graph Mailer support#3240

Open
fracaron wants to merge 2 commits intosameersbn:masterfrom
fracaron:feature/microsoft-graph-mailer
Open

Add Microsoft Graph Mailer support#3240
fracaron wants to merge 2 commits intosameersbn:masterfrom
fracaron:feature/microsoft-graph-mailer

Conversation

@fracaron
Copy link
Copy Markdown

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

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 sameersbn#3239
Comment thread README.md

Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of SMTP parameters that can be specified.

##### Microsoft Graph Mailer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add to TOC (line 25-26).

    - [Mail](#mail)
+       - [Microsoft Graph Mailer](#microsoft-graph-mailer)
        - [Reply by email](#reply-by-email)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kkimurak
Copy link
Copy Markdown
Contributor

I'm not very familiar with Microsoft Exchange Online, but is this related to/overlaps with #2610 (IMAP support)?

@fracaron
Copy link
Copy Markdown
Author

I'm not very familiar with Microsoft Exchange Online, but is this related to/overlaps with #2610 (IMAP support)?

Related but not overlapping. #2610 covers inbound mail (replacing IMAP for "Reply by email" via the Graph API), while this PR covers outbound mail (replacing SMTP for notifications). They configure different sections of gitlab.yml (incoming_email / mailroom vs microsoft_graph_mailer) and can be merged independently.

One thing to note: the Microsoft Graph Mailer isn't an SMTP transport — it's a REST-based delivery method (sendMail endpoint) that GitLab wires into ActionMailer via its own railtie, so there's no conflict with the existing SMTP settings as long as SMTP_ENABLED=false.

@fracaron
Copy link
Copy Markdown
Author

For context on the motivation: our organization is disabling SMTP basic auth on Exchange Online in early summer 2026, which is what prompted us to contribute this rather than wait. We'd much prefer to stay on sameersbn/docker-gitlab instead of switching images, so landing Graph Mailer support upstream matters to us.
Happy to iterate on the implementation if you'd like changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Microsoft Graph Mailer support

2 participants