Skip to content

[Mailer] Add MicrosoftGraph API Transport #60408

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

Closed
wants to merge 13 commits into from
Closed

Conversation

creiner
Copy link
Contributor

@creiner creiner commented May 13, 2025

Q A
Branch? 7.3
Bug fix? no
New feature? yes
Deprecations? no
Issues Old PR #52546
License MIT

This PR has it beggining in #52546 and I implemented the changes from the comments by stof.

There is one thing I'm unsure with:
#52546 (comment)
The microsoft.kiota dependency is added and managed via the microsoft-graph -> microsoft-graph-core -> microsoft/kiota-authentication-phpleague-php package.
I'm unsure about pinning one of the transitive dependencies to a fixed version?
I think then we should also add the other microsoft/kiota-* packages there.

creiner and others added 3 commits May 13, 2025 14:13
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
@bobvandevijver
Copy link
Contributor

bobvandevijver commented Jul 30, 2025

@creiner Great work so far 👍🏻

This PR looks stalled and I see there are some conflicts. Can you solve those? Would love to see this merged soon! (would also be fine with taking this over and create an updated implementation if you'd like).

use Symfony\Component\Mime\Part\DataPart;
use Symfony\Component\Mime\RawMessage;

class MicrosoftGraphTransport implements TransportInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the interface being used directly, instead of the AbstractApiTransport? That would also remove the need of the Email check in the send method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I will have a look at it this weekend.

@bobvandevijver
Copy link
Contributor

I'm currently working on an alternative implementation that does not pull the complete MS SDK dependency.

@creiner
Copy link
Contributor Author

creiner commented Jul 31, 2025

To avoid duplicated efforts, it would be helpful to understand which approach is preferred by the Symfony team?

@nicolas-grekas nicolas-grekas changed the title [Mailer] Add MSGraph API Transport [Mailer] Add MicrosoftGraph API Transport Jul 31, 2025
@xabbuh
Copy link
Member

xabbuh commented Jul 31, 2025

What is the alternative to using the Microsoft SDK?

@bobvandevijver
Copy link
Contributor

@xabbuh Manually executing two HTTP POST requests. See #61290 for the implementation.

@OskarStark
Copy link
Contributor

I prefer #61290 over this PR. Agree @xabbuh ?

@xabbuh
Copy link
Member

xabbuh commented Aug 1, 2025

Yes, same for me. Let's close here in favour of #61290. Thank you for kickstarting this @creiner.

@xabbuh xabbuh closed this Aug 1, 2025
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.

8 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