@@ -151,6 +151,15 @@ Configuration
151
151
152
152
* :ref: `name <reference-lock-resources-name >`
153
153
154
+ * `mailer `_
155
+
156
+ * :ref: `dsn <mailer-dsn >`
157
+ * `transports `_
158
+ * `envelope `_
159
+
160
+ * `sender `_
161
+ * `recipients `_
162
+
154
163
* `php_errors `_
155
164
156
165
* `log `_
@@ -159,7 +168,7 @@ Configuration
159
168
* `profiler `_
160
169
161
170
* `collect `_
162
- * `dsn `_
171
+ * :ref: `dsn < profiler-dsn >`
163
172
* :ref: `enabled <reference-profiler-enabled >`
164
173
* `only_exceptions `_
165
174
* `only_master_requests `_
@@ -1075,6 +1084,8 @@ only_master_requests
1075
1084
When this is set to ``true ``, the profiler will only be enabled on the master
1076
1085
requests (and not on the subrequests).
1077
1086
1087
+ .. _profiler-dsn :
1088
+
1078
1089
dsn
1079
1090
...
1080
1091
@@ -2932,6 +2943,93 @@ Name of the lock you want to create.
2932
2943
decorates : lock.invoice.store
2933
2944
arguments : ['@lock.invoice.retry_till_save.store.inner', 100, 50]
2934
2945
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
+
2935
3033
workflows
2936
3034
~~~~~~~~~
2937
3035
0 commit comments