@@ -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,17 @@ Configuration
174
174
175
175
* :ref: `name <reference-lock-resources-name >`
176
176
177
+ * `mailer `_
178
+
179
+ * :ref: `dsn <mailer-dsn >`
180
+ * `transports `_
181
+ * `envelope `_
182
+
183
+ * `sender `_
184
+ * `recipients `_
185
+
186
+ * :ref: `headers <mailer-headers >`
187
+
177
188
* `php_errors `_
178
189
179
190
* `log `_
@@ -182,7 +193,7 @@ Configuration
182
193
* `profiler `_
183
194
184
195
* `collect `_
185
- * `dsn `_
196
+ * :ref: `dsn < profiler-dsn >`
186
197
* :ref: `enabled <reference-profiler-enabled >`
187
198
* `only_exceptions `_
188
199
* `only_master_requests `_
@@ -915,6 +926,8 @@ enabled
915
926
Whether to enable the support for retry failed HTTP request or not.
916
927
This setting is automatically set to true when one of the child settings is configured.
917
928
929
+ .. _http-headers :
930
+
918
931
headers
919
932
.......
920
933
@@ -1196,6 +1209,8 @@ only_master_requests
1196
1209
When this is set to ``true ``, the profiler will only be enabled on the master
1197
1210
requests (and not on the subrequests).
1198
1211
1212
+ .. _profiler-dsn :
1213
+
1199
1214
dsn
1200
1215
...
1201
1216
@@ -2973,6 +2988,105 @@ Name of the lock you want to create.
2973
2988
decorates : lock.invoice.store
2974
2989
arguments : ['@.inner', 100, 50]
2975
2990
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
+
2976
3090
workflows
2977
3091
~~~~~~~~~
2978
3092
0 commit comments