@@ -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,88 @@ 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+ # config/packages/mailer.yaml
2986+ framework :
2987+ mailer :
2988+ dsn : ' smtp://localhost:25'
2989+ envelope :
2990+ 2991+
2992+ .. code-block :: xml
2993+ <!-- config/packages/mailer.xml -->
2994+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2995+ <container xmlns =" http://symfony.com/schema/dic/services"
2996+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2997+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
2998+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
2999+ https://symfony.com/schema/dic/services/services-1.0.xsd
3000+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
3001+ <framework : config >
3002+ <framework : mailer dsn =" smtp://localhost:25" >
3003+ <framework : envelope >
3004+ <framework : recipients >[email protected] </framework : recipients > 3005+ <framework : recipients >[email protected] </framework : recipients > 3006+ </framework : envelope >
3007+ </framework : mailer >
3008+ </framework : config >
3009+ </container >
3010+
3011+ .. code-block :: php
3012+ // config/packages/mailer.php
3013+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
3014+ return static function (ContainerConfigurator $containerConfigurator): void {
3015+ $containerConfigurator->extension('framework', [
3016+ 'mailer' => [
3017+ 'dsn' => 'smtp://localhost:25',
3018+ 'envelope' => [
3019+ 'recipients' => [
3020+ 3021+ 3022+ ]
3023+ ]
3024+ ]
3025+ ]);
3026+ };
3027+
29353028 workflows
29363029~~~~~~~~~
29373030
0 commit comments