Skip to content

[Mailer] Add MicrosoftGraph API Transport #61290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025

Conversation

bobvandevijver
Copy link
Contributor

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Alternative for #60408
License MIT

Add a new Mailer bridge for the Microsoft Graph API, but without adding the complete Microsoft SDK as we're talking about just two HTTP POST requests.

I continued the work done in #60408 and kept the names mentioned there in the composer definition, but this implementation has been made from scratch, is based on the existing Azure Bridge and supports more features such as priority and inline attachments.

@bobvandevijver

This comment was marked as resolved.

@MatTheCat
Copy link
Contributor

Don’t know if it’s related but it looks like you forgot to update registerMailerConfiguration’s $classToServices in the FrameworkExtension:

@bobvandevijver bobvandevijver force-pushed the microsoft-graph-mailer branch from a117a29 to e5100cc Compare July 31, 2025 19:08
@bobvandevijver
Copy link
Contributor Author

@MatTheCat You are today's hero, thank you!

@bobvandevijver bobvandevijver force-pushed the microsoft-graph-mailer branch 2 times, most recently from 00ecd57 to 37f87a2 Compare August 1, 2025 11:24
@bobvandevijver

This comment was marked as outdated.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM, I trust you've tested this against the real thing :)
Here are some nitpicking

@bobvandevijver
Copy link
Contributor Author

Another test failure, but seems unrelated to the changes here.

}

if (null === $authEndpoint) {
throw new IncompleteDsnException("Transport 'microsoftgraph+api' requires the 'authEndpoint' option when not using the default graph endpoint.");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new IncompleteDsnException("Transport 'microsoftgraph+api' requires the 'authEndpoint' option when not using the default graph endpoint.");
throw new IncompleteDsnException('Transport "microsoftgraph+api" requires the "authEndpoint" option when not using the default graph endpoint.');

We are using " quotes in exception messages.

@fabpot fabpot force-pushed the microsoft-graph-mailer branch from 0fc08d3 to 7a1e3fb Compare August 6, 2025 18:12
@fabpot
Copy link
Member

fabpot commented Aug 6, 2025

Thank you @bobvandevijver.

@fabpot fabpot merged commit 0e2dea5 into symfony:7.4 Aug 6, 2025
5 of 12 checks passed
@bobvandevijver bobvandevijver deleted the microsoft-graph-mailer branch August 6, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy