diff --git a/mailer.rst b/mailer.rst index 7f1c95d87bd..7d9d51c65bd 100644 --- a/mailer.rst +++ b/mailer.rst @@ -1675,15 +1675,18 @@ 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 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