Problem/Motivation
Due to the way that the transport is loaded through the configuration - there is no mechanism at present for the Symfony events to be dispatched (the event dispatcher is not passed through when setting up the transport / factory) resulting in us being unable to subscribe to the MessageEvent, SentMessageEvent, FailedMessageEvent that would otherwise be raised.
This is counter intuitive vs the mailer service definition itself, which then does pass the event dispatcher, however it'll only raise queuing events when a message bus is passed in (optional dependency in current definition).
Ultimately this is a developer experience problem, as this doesn't alter the ability to send emails directly - but more the ability to respond to events connected to them
Proposed resolution
Change the way that the factory generates the transports so that we are indeed passing the event dispatcher when creating our respective Transports service definition.
Issue fork symfony_mailer_lite-3418269
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dan.munn CreditAttribution: dan.munn at Unipro Ltd commentedComment #4
zengenuity CreditAttribution: zengenuity at DrupalTutor / Zengenuity commentedAfter merging #3418099: Created transports can not be altered, this MR needs to be updated to resolve conflicts.
Comment #5
dan.munn CreditAttribution: dan.munn at Unipro Ltd commentedMR Updated against the latest state of 1.0.x branch.
Comment #7
zengenuity CreditAttribution: zengenuity at DrupalTutor / Zengenuity commentedMerged. Thanks!