Ability to use custom transports with symfony/mailer

Created on 27 November 2023, 7 months ago
Updated 14 January 2024, 6 months ago

Problem/Motivation

Similar to πŸ› Cannot save a custom transport because the Symfony static Transport class is used Active

When attempting to use a custom transport like hafael/azure-mailer-driver you cannot do so despite Drupal 10.2 including symfony/mailer β†’ .

This is because Drupal only includes the "default" factories:
https://git.drupalcode.org/project/drupal/-/blob/5d0114192439b79e314416c...

Steps to reproduce

  1. Add hafael/azure-mailer-driver
  2. Create a service with config like:
        azure_mailer.transport_factory:
          class: Hafael\Azure\Transport\AzureMailerTransportFactory
          tags:
            - { name: mailer.transport_factory }
    
  3. Attempt to use an azure DSN

Proposed resolution

Lookup services by the mailer.transport_factory tag which is the same tag used by Symfony.

Remaining tasks

  1. Write Tests
  2. Write Patch

User interface changes

N/A

API changes

Custom transports will be available where previously they were not.

Data model changes

N/A

Release notes snippet

✨ Feature request
Status

Needs work

Version

10.2 ✨

Component
MailΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States davidwbarratt

Live updates comments and jobs are added and updated live.
  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024