-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.4.18
Description
TemplatedEmail are rendered two times: both the Mailer
and the AbstractTransport
class dispatch a MessageEvent.
The renderer (generally the BodyRenderer
from TwigBridge) do not check if the email is already rendered and override the email contents (re-rendering the twig template).
How to reproduce
Send an email and check the event dispatcher logs, you can use a twig extension with a filter called inside the twig template to easily catch it.
Possible Solution
The render should check if the templated email is already rendered? Or maybe dispatch the email only one time?
Additional context