@@ -151,6 +151,15 @@ Configuration
151151
152152 * :ref: `name <reference-lock-resources-name >`
153153
154+ * `mailer `_
155+
156+ * :ref: `dsn <mailer-dsn >`
157+ * `transports `_
158+ * `envelope `_
159+
160+ * `sender `_
161+ * `recipients `_
162+
154163* `php_errors `_
155164
156165 * `log `_
@@ -159,7 +168,7 @@ Configuration
159168* `profiler `_
160169
161170 * `collect `_
162- * `dsn `_
171+ * :ref: `dsn < profiler-dsn >`
163172 * :ref: `enabled <reference-profiler-enabled >`
164173 * `only_exceptions `_
165174 * `only_master_requests `_
@@ -1075,6 +1084,8 @@ only_master_requests
10751084When this is set to ``true ``, the profiler will only be enabled on the master
10761085requests (and not on the subrequests).
10771086
1087+ .. _profiler-dsn :
1088+
10781089dsn
10791090...
10801091
@@ -2932,6 +2943,93 @@ Name of the lock you want to create.
29322943 decorates : lock.invoice.store
29332944 arguments : ['@lock.invoice.retry_till_save.store.inner', 100, 50]
29342945
2946+ mailer
2947+ ~~~~~~
2948+
2949+ .. _mailer-dsn :
2950+
2951+ dsn
2952+ ...
2953+
2954+ **type **: ``string ``
2955+
2956+ The DSN used by the mailer. When several DSN may be used, use `transports ` (see below) instead.
2957+
2958+ transports
2959+ ..........
2960+
2961+ **type **: ``array ``
2962+
2963+ A :ref: `list of DSN <multiple-email-transports >` that can be used by the mailer. A transport name is the key and the dsn is the value.
2964+
2965+ envelope
2966+ ........
2967+
2968+ sender
2969+ """"""
2970+
2971+ **type **: ``string ``
2972+
2973+ Sender used by the `Mailer `. Keep in mind that this setting override a sender set in the code.
2974+
2975+ recipients
2976+ """"""""""
2977+
2978+ **type **: ``array ``
2979+
2980+ Recipients used by the `Mailer `. Keep in mind that this setting override recipients set in the code.
2981+
2982+ .. configuration-block ::
2983+
2984+ .. code-block :: yaml
2985+
2986+ # config/packages/mailer.yaml
2987+ framework :
2988+ mailer :
2989+ dsn : ' smtp://localhost:25'
2990+ envelope :
2991+ 2992+
2993+ .. code-block :: xml
2994+
2995+ <!-- config/packages/mailer.xml -->
2996+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2997+ <container xmlns =" http://symfony.com/schema/dic/services"
2998+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2999+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
3000+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
3001+ https://symfony.com/schema/dic/services/services-1.0.xsd
3002+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
3003+
3004+ <framework : config >
3005+ <framework : mailer dsn =" smtp://localhost:25" >
3006+ <framework : envelope >
3007+ <framework : recipients >[email protected] </framework : recipients > 3008+ <framework : recipients >[email protected] </framework : recipients > 3009+ </framework : envelope >
3010+ </framework : mailer >
3011+ </framework : config >
3012+ </container >
3013+
3014+ .. code-block :: php
3015+
3016+ // config/packages/mailer.php
3017+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
3018+
3019+ return static function (ContainerConfigurator $containerConfigurator): void {
3020+ $containerConfigurator->extension('framework', [
3021+ 'mailer' => [
3022+ 'dsn' => 'smtp://localhost:25',
3023+ 'envelope' => [
3024+ 'recipients' => [
3025+ 3026+ 3027+ ]
3028+ ]
3029+ ]
3030+ ]);
3031+ };
3032+
29353033 workflows
29363034~~~~~~~~~
29373035
0 commit comments