@@ -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 `_
@@ -151,6 +151,18 @@ Configuration
151
151
152
152
* :ref: `name <reference-lock-resources-name >`
153
153
154
+ * `mailer `_
155
+
156
+ * :ref: `dsn <mailer-dsn >`
157
+ * `transports `_
158
+ * `message_bus `_
159
+ * `envelope `_
160
+
161
+ * `sender `_
162
+ * `recipients `_
163
+
164
+ * :ref: `headers <mailer-headers >`
165
+
154
166
* `php_errors `_
155
167
156
168
* `log `_
@@ -159,7 +171,7 @@ Configuration
159
171
* `profiler `_
160
172
161
173
* `collect `_
162
- * `dsn `_
174
+ * :ref: `dsn < profiler-dsn >`
163
175
* :ref: `enabled <reference-profiler-enabled >`
164
176
* `only_exceptions `_
165
177
* `only_master_requests `_
@@ -835,6 +847,8 @@ ciphers
835
847
A list of the names of the ciphers allowed for the SSL/TLS connections. They
836
848
can be separated by colons, commas or spaces (e.g. ``'RC4-SHA:TLS13-AES-128-GCM-SHA256' ``).
837
849
850
+ .. _http-headers :
851
+
838
852
headers
839
853
.......
840
854
@@ -1039,6 +1053,8 @@ only_master_requests
1039
1053
When this is set to ``true ``, the profiler will only be enabled on the master
1040
1054
requests (and not on the subrequests).
1041
1055
1056
+ .. _profiler-dsn :
1057
+
1042
1058
dsn
1043
1059
...
1044
1060
@@ -2819,6 +2835,109 @@ Name of the lock you want to create.
2819
2835
decorates : lock.invoice.store
2820
2836
arguments : ['@.inner', 100, 50]
2821
2837
2838
+ mailer
2839
+ ~~~~~~
2840
+
2841
+ .. _mailer-dsn :
2842
+
2843
+ dsn
2844
+ ...
2845
+
2846
+ **type **: ``string ``
2847
+
2848
+ The DSN used by the mailer. When several DSN may be used, use `transports ` (see below) instead.
2849
+
2850
+ transports
2851
+ ..........
2852
+
2853
+ **type **: ``array ``
2854
+
2855
+ 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.
2856
+
2857
+ message_bus
2858
+ ...........
2859
+
2860
+ **type **: ``string `` | ``false ``
2861
+
2862
+ Service identifier of the bus to use (when the messenger component is installed, for instance `messenger.default_bus `)
2863
+
2864
+ envelope
2865
+ ........
2866
+
2867
+ sender
2868
+ """"""
2869
+
2870
+ **type **: ``string ``
2871
+
2872
+ Sender used by the `Mailer `. Keep in mind that this setting override a sender set in the code.
2873
+
2874
+ recipients
2875
+ """"""""""
2876
+
2877
+ **type **: ``array ``
2878
+
2879
+ Recipients used by the `Mailer `. Keep in mind that this setting override recipients set in the code.
2880
+
2881
+ .. configuration-block ::
2882
+
2883
+ .. code-block :: yaml
2884
+
2885
+ # config/packages/mailer.yaml
2886
+ framework :
2887
+ mailer :
2888
+ dsn : ' smtp://localhost:25'
2889
+ envelope :
2890
+ recipients : ['admin@symfony.com', 'lead@symfony.com']
2891
+
2892
+ .. code-block :: xml
2893
+
2894
+ <!-- config/packages/mailer.xml -->
2895
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2896
+ <container xmlns =" http://symfony.com/schema/dic/services"
2897
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2898
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
2899
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
2900
+ https://symfony.com/schema/dic/services/services-1.0.xsd
2901
+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
2902
+
2903
+ <framework : config >
2904
+ <framework : mailer dsn =" smtp://localhost:25" >
2905
+ <framework : envelope >
2906
+ <framework : recipients >admin@symfony.com</framework : recipients >
2907
+ <framework : recipients >lead@symfony.com</framework : recipients >
2908
+ </framework : envelope >
2909
+ </framework : mailer >
2910
+ </framework : config >
2911
+ </container >
2912
+
2913
+ .. code-block :: php
2914
+
2915
+ // config/packages/mailer.php
2916
+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
2917
+
2918
+ return static function (ContainerConfigurator $containerConfigurator): void {
2919
+ $containerConfigurator->extension('framework', [
2920
+ 'mailer' => [
2921
+ 'dsn' => 'smtp://localhost:25',
2922
+ 'envelope' => [
2923
+ 'recipients' => [
2924
+ 'admin@symfony.com',
2925
+ 'lead@symfony.com'
2926
+ ]
2927
+ ]
2928
+ ]
2929
+ ]);
2930
+ };
2931
+
2932
+ .. _mailer-headers :
2933
+
2934
+ headers
2935
+ .......
2936
+
2937
+ **type **: ``array ``
2938
+
2939
+ Headers to add to emails. key (`name ` attribute in xml format) is the header name and value the header value.
2940
+
2822
2941
workflows
2823
2942
~~~~~~~~~
2824
2943
0 commit comments