Expose symfony mailer events
machour opened this issue · 2 comments
machour commented
What steps will reproduce the problem?
Currently there is no way to hook on the Mailer Events
What's expected?
I expect to be able to set a Yii event for this, and be able to interact with Symfony Mailer prior to message sending, to inline CSS for example.
What do you get instead?
Nothing, and that's blocking me from switching from Swift Mailer.
Let's implement this after #27 gets finally merged.
SamMousa commented
#27 was merged btw!
To implement this in a generic way we must implement EventDispatcherInterface
and route the message to the Yii event system. I'd argue for making this a separate adapter library. It has uses for hooking up any Symfony library with the Yii event system.
Next step would be to pass this event dispatcher to the call to Transport::getDefaultFactories()
.