@@ -98,7 +98,7 @@ Configuration
98
98
* `cafile `_
99
99
* `capath `_
100
100
* `ciphers `_
101
- * `headers `_
101
+ * :ref: `headers < http-headers >`
102
102
* `http_version `_
103
103
* `local_cert `_
104
104
* `local_pk `_
@@ -126,7 +126,7 @@ Configuration
126
126
* `cafile `_
127
127
* `capath `_
128
128
* `ciphers `_
129
- * `headers `_
129
+ * :ref: `headers < http-headers >`
130
130
* `http_version `_
131
131
* `local_cert `_
132
132
* `local_pk `_
@@ -174,6 +174,18 @@ Configuration
174
174
175
175
* :ref: `name <reference-lock-resources-name >`
176
176
177
+ * `mailer `_
178
+
179
+ * :ref: `dsn <mailer-dsn >`
180
+ * `transports `_
181
+ * `message_bus `_
182
+ * `envelope `_
183
+
184
+ * `sender `_
185
+ * `recipients `_
186
+
187
+ * :ref: `headers <mailer-headers >`
188
+
177
189
* `php_errors `_
178
190
179
191
* `log `_
@@ -182,7 +194,7 @@ Configuration
182
194
* `profiler `_
183
195
184
196
* `collect `_
185
- * `dsn `_
197
+ * :ref: `dsn < profiler-dsn >`
186
198
* :ref: `enabled <reference-profiler-enabled >`
187
199
* `only_exceptions `_
188
200
* `only_master_requests `_
@@ -915,6 +927,8 @@ enabled
915
927
Whether to enable the support for retry failed HTTP request or not.
916
928
This setting is automatically set to true when one of the child settings is configured.
917
929
930
+ .. _http-headers :
931
+
918
932
headers
919
933
.......
920
934
@@ -1196,6 +1210,8 @@ only_master_requests
1196
1210
When this is set to ``true ``, the profiler will only be enabled on the master
1197
1211
requests (and not on the subrequests).
1198
1212
1213
+ .. _profiler-dsn :
1214
+
1199
1215
dsn
1200
1216
...
1201
1217
@@ -2973,6 +2989,110 @@ Name of the lock you want to create.
2973
2989
decorates : lock.invoice.store
2974
2990
arguments : ['@.inner', 100, 50]
2975
2991
2992
+ mailer
2993
+ ~~~~~~
2994
+
2995
+ .. _mailer-dsn :
2996
+
2997
+ dsn
2998
+ ...
2999
+
3000
+ **type **: ``string ``
3001
+
3002
+ The DSN used by the mailer. When several DSN may be used, use `transports ` (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 mailer. A transport name is the key and the dsn is the value.
3010
+
3011
+ message_bus
3012
+ ...........
3013
+
3014
+ **type **: ``string `` | ``false ``
3015
+
3016
+ Service identifier of the bus to use (when the messenger component is installed, for instance `messenger.default_bus `)
3017
+
3018
+ envelope
3019
+ ........
3020
+
3021
+ sender
3022
+ """"""
3023
+
3024
+ **type **: ``string ``
3025
+
3026
+ Sender used by the ``Mailer ``. Keep in mind that this setting override a sender set in the code.
3027
+
3028
+ recipients
3029
+ """"""""""
3030
+
3031
+ **type **: ``array ``
3032
+
3033
+ Recipients used by the ``Mailer ``. Keep in mind that this setting override recipients set in the code.
3034
+
3035
+ .. configuration-block ::
3036
+
3037
+ .. code-block :: yaml
3038
+
3039
+ # config/packages/mailer.yaml
3040
+ framework :
3041
+ mailer :
3042
+ dsn : ' smtp://localhost:25'
3043
+ envelope :
3044
+
3045
+
3046
+ .. code-block :: xml
3047
+
3048
+ <!-- config/packages/mailer.xml -->
3049
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
3050
+ <container xmlns =" http://symfony.com/schema/dic/services"
3051
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3052
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
3053
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
3054
+ https://symfony.com/schema/dic/services/services-1.0.xsd
3055
+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
3056
+
3057
+ <framework : config >
3058
+ <framework : mailer dsn =" smtp://localhost:25" >
3059
+ <framework : envelope >
3060
+ <framework : recipients >[email protected] </framework : recipients >
3061
+ <framework : recipients >[email protected] </framework : recipients >
3062
+ </framework : envelope >
3063
+ </framework : mailer >
3064
+ </framework : config >
3065
+ </container >
3066
+
3067
+ .. code-block :: php
3068
+
3069
+ // config/packages/mailer.php
3070
+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
3071
+
3072
+ return static function (ContainerConfigurator $containerConfigurator): void {
3073
+ $containerConfigurator->extension('framework', [
3074
+ 'mailer' => [
3075
+ 'dsn' => 'smtp://localhost:25',
3076
+ 'envelope' => [
3077
+ 'recipients' => [
3078
+
3079
+
3080
+ ]
3081
+ ]
3082
+ ]
3083
+ ]);
3084
+ };
3085
+
3086
+ .. _mailer-headers :
3087
+
3088
+ headers
3089
+ .......
3090
+
3091
+ **type **: ``array ``
3092
+
3093
+ Headers to add to emails. key (``name `` attribute in xml format)
3094
+ is the header name and value the header value.
3095
+
2976
3096
workflows
2977
3097
~~~~~~~~~
2978
3098
0 commit comments