@@ -98,7 +98,7 @@ Configuration
9898 * `cafile `_
9999 * `capath `_
100100 * `ciphers `_
101- * `headers `_
101+ * :ref: `headers < http-headers >`
102102 * `http_version `_
103103 * `local_cert `_
104104 * `local_pk `_
@@ -126,7 +126,7 @@ Configuration
126126 * `cafile `_
127127 * `capath `_
128128 * `ciphers `_
129- * `headers `_
129+ * :ref: `headers < http-headers >`
130130 * `http_version `_
131131 * `local_cert `_
132132 * `local_pk `_
@@ -174,6 +174,17 @@ Configuration
174174
175175 * :ref: `name <reference-lock-resources-name >`
176176
177+ * `mailer `_
178+
179+ * :ref: `dsn <mailer-dsn >`
180+ * `transports `_
181+ * `envelope `_
182+
183+ * `sender `_
184+ * `recipients `_
185+
186+ * :ref: `headers <mailer-headers >`
187+
177188* `php_errors `_
178189
179190 * `log `_
@@ -182,7 +193,7 @@ Configuration
182193* `profiler `_
183194
184195 * `collect `_
185- * `dsn `_
196+ * :ref: `dsn < profiler-dsn >`
186197 * :ref: `enabled <reference-profiler-enabled >`
187198 * `only_exceptions `_
188199 * `only_master_requests `_
@@ -915,6 +926,8 @@ enabled
915926Whether to enable the support for retry failed HTTP request or not.
916927This setting is automatically set to true when one of the child settings is configured.
917928
929+ .. _http-headers :
930+
918931headers
919932.......
920933
@@ -1196,6 +1209,8 @@ only_master_requests
11961209When this is set to ``true ``, the profiler will only be enabled on the master
11971210requests (and not on the subrequests).
11981211
1212+ .. _profiler-dsn :
1213+
11991214dsn
12001215...
12011216
@@ -2973,6 +2988,105 @@ Name of the lock you want to create.
29732988 decorates : lock.invoice.store
29742989 arguments : ['@.inner', 100, 50]
29752990
2991+ mailer
2992+ ~~~~~~
2993+
2994+ .. _mailer-dsn :
2995+
2996+ dsn
2997+ ...
2998+
2999+ **type **: ``string `` **default **: ``null ``
3000+
3001+ The DSN used by the mailer. When several DSN may be used, use
3002+ ``transports `` option (see below) instead.
3003+
3004+ transports
3005+ ..........
3006+
3007+ **type **: ``array ``
3008+
3009+ A :ref: `list of DSN <multiple-email-transports >` that can be used by the
3010+ mailer. A transport name is the key and the dsn is the value.
3011+
3012+ envelope
3013+ ........
3014+
3015+ sender
3016+ """"""
3017+
3018+ **type **: ``string ``
3019+
3020+ Sender used by the ``Mailer ``. Keep in mind that this setting override a
3021+ sender set in the code.
3022+
3023+ recipients
3024+ """"""""""
3025+
3026+ **type **: ``array ``
3027+
3028+ Recipients used by the ``Mailer ``. Keep in mind that this setting override
3029+ recipients set in the code.
3030+
3031+ .. configuration-block ::
3032+
3033+ .. code-block :: yaml
3034+
3035+ # config/packages/mailer.yaml
3036+ framework :
3037+ mailer :
3038+ dsn : ' smtp://localhost:25'
3039+ envelope :
3040+ recipients : ['admin@symfony.com', 'lead@symfony.com']
3041+
3042+ .. code-block :: xml
3043+
3044+ <!-- config/packages/mailer.xml -->
3045+ <?xml version =" 1.0" encoding =" UTF-8" ?>
3046+ <container xmlns =" http://symfony.com/schema/dic/services"
3047+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3048+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
3049+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
3050+ https://symfony.com/schema/dic/services/services-1.0.xsd
3051+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
3052+ <framework : config >
3053+ <framework : mailer dsn =" smtp://localhost:25" >
3054+ <framework : envelope >
3055+ <framework : recipient >admin@symfony.com</framework : recipient >
3056+ <framework : recipient >lead@symfony.com</framework : recipient >
3057+ </framework : envelope >
3058+ </framework : mailer >
3059+ </framework : config >
3060+ </container >
3061+
3062+ .. code-block :: php
3063+
3064+ // config/packages/mailer.php
3065+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
3066+ return static function (ContainerConfigurator $containerConfigurator): void {
3067+ $containerConfigurator->extension('framework', [
3068+ 'mailer' => [
3069+ 'dsn' => 'smtp://localhost:25',
3070+ 'envelope' => [
3071+ 'recipients' => [
3072+ 'admin@symfony.com',
3073+ 'lead@symfony.com',
3074+ ]
3075+ ]
3076+ ]
3077+ ]);
3078+ };
3079+
3080+ .. _mailer-headers :
3081+
3082+ headers
3083+ .......
3084+
3085+ **type **: ``array ``
3086+
3087+ Headers to add to emails. key (``name `` attribute in xml format)
3088+ is the header name and value the header value.
3089+
29763090workflows
29773091~~~~~~~~~
29783092
0 commit comments