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.

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dan.munn created an issue. See original summary.

dan.munn’s picture

Status: Active » Needs review
zengenuity’s picture

Status: Needs review » Needs work

After merging #3418099: Created transports can not be altered, this MR needs to be updated to resolve conflicts.

dan.munn’s picture

Status: Needs work » Needs review

MR Updated against the latest state of 1.0.x branch.

  • zengenuity committed 281919df on 1.0.x authored by dan.munn
    Issue #3418269 by dan.munn, zengenuity: Symfony mailer transports are...
zengenuity’s picture

Status: Needs review » Fixed

Merged. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.