From 83a5db09866c1b849bdce79875e65ee1d34e8cff Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 27 Nov 2025 21:00:11 +0100 Subject: [PATCH 1/2] [Mailer] Switching to new array-shape config format Page: https://symfony.com/doc/7.4/mailer.html#multiple-email-transports --- mailer.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mailer.rst b/mailer.rst index 7f1c95d87bd..7525f0caea9 100644 --- a/mailer.rst +++ b/mailer.rst @@ -1678,12 +1678,16 @@ This can be configured by replacing the ``dsn`` configuration entry with a use Symfony\Config\FrameworkConfig; use function Symfony\Component\DependencyInjection\Loader\Configurator\env; - return static function (FrameworkConfig $framework): void { - $framework->mailer() - ->transport('main', env('MAILER_DSN')) - ->transport('alternative', env('MAILER_DSN_IMPORTANT')) - ; - }; + return App::config([ + 'framework' => [ + 'mailer' => [ + 'transports' => [ + 'main' => env('MAILER_DSN'), + 'alternative' => env('MAILER_DSN_IMPORTANT'), + ] + ] + ] + ]); By default the first transport is used. The other transports can be selected by adding an ``X-Transport`` header (which Mailer will remove automatically from From 105eacb8a295ec9cfc34c5b0a53e9ed54112ac42 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 27 Nov 2025 21:01:18 +0100 Subject: [PATCH 2/2] Update mailer.rst --- mailer.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/mailer.rst b/mailer.rst index 7525f0caea9..7d9d51c65bd 100644 --- a/mailer.rst +++ b/mailer.rst @@ -1675,7 +1675,6 @@ This can be configured by replacing the ``dsn`` configuration entry with a .. code-block:: php // config/packages/mailer.php - use Symfony\Config\FrameworkConfig; use function Symfony\Component\DependencyInjection\Loader\Configurator\env; return App::config([