Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1675,15 +1675,18 @@
.. 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'),
]
]
]
]);

Check failure on line 1689 in mailer.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[Cache Warmup] 2025-11-28T07:54:09+00:00 [critical] Uncaught Error: Class "App" not found

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
Expand Down
Loading