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
Capturing emails sent with Symfony 6.3 using an event listener for SentMessageEvent results in an unexpected behavior. The context, set on the email when created with TemplatedEmail, appears to be empty when the onMessageSent method is triggered.
Do not know if this is the expected behavior! this was reproduced while trying to get the actual email content that has been set and try to get it along with the context data
ayaou
changed the title
Message context lost when captured on MessageSent event
Symfony Mailer: Message context lost when captured on MessageSent event
Nov 19, 2023
Symfony version(s) affected
6.3.8
Description
Capturing emails sent with Symfony 6.3 using an event listener for SentMessageEvent results in an unexpected behavior. The context, set on the email when created with TemplatedEmail, appears to be empty when the onMessageSent method is triggered.
Do not know if this is the expected behavior! this was reproduced while trying to get the actual email content that has been set and try to get it along with the context data
How to reproduce
Below is the relevant code for sending the email:
And here's the relevant part of the event listener:
The text was updated successfully, but these errors were encountered: