-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[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
Conversation
- added mail text body handling - removed unused properties - added composer deps
src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Transport/MicrosoftGraphTransport.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
@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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I'm currently working on an alternative implementation that does not pull the complete MS SDK dependency. |
To avoid duplicated efforts, it would be helpful to understand which approach is preferred by the Symfony team? |
What is the alternative to using the Microsoft SDK? |
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.