@@ -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 `_
@@ -151,6 +151,17 @@ Configuration
151151
152152 * :ref: `name <reference-lock-resources-name >`
153153
154+ * `mailer `_
155+
156+ * :ref: `dsn <mailer-dsn >`
157+ * `transports `_
158+ * `envelope `_
159+
160+ * `sender `_
161+ * `recipients `_
162+
163+ * :ref: `headers <mailer-headers >`
164+
154165* `php_errors `_
155166
156167 * `log `_
@@ -159,7 +170,7 @@ Configuration
159170* `profiler `_
160171
161172 * `collect `_
162- * `dsn `_
173+ * :ref: `dsn < profiler-dsn >`
163174 * :ref: `enabled <reference-profiler-enabled >`
164175 * `only_exceptions `_
165176 * `only_master_requests `_
@@ -867,6 +878,8 @@ ciphers
867878A list of the names of the ciphers allowed for the SSL/TLS connections. They
868879can be separated by colons, commas or spaces (e.g. ``'RC4-SHA:TLS13-AES-128-GCM-SHA256' ``).
869880
881+ .. _http-headers :
882+
870883headers
871884.......
872885
@@ -1075,6 +1088,8 @@ only_master_requests
10751088When this is set to ``true ``, the profiler will only be enabled on the master
10761089requests (and not on the subrequests).
10771090
1091+ .. _profiler-dsn :
1092+
10781093dsn
10791094...
10801095
@@ -2888,6 +2903,101 @@ Name of the lock you want to create.
28882903 decorates : lock.invoice.store
28892904 arguments : ['@lock.invoice.retry_till_save.store.inner', 100, 50]
28902905
2906+ mailer
2907+ ~~~~~~
2908+
2909+ .. _mailer-dsn :
2910+
2911+ dsn
2912+ ...
2913+
2914+ **type **: ``string ``
2915+
2916+ The DSN used by the mailer. When several DSN may be used, use `transports ` (see below) instead.
2917+
2918+ transports
2919+ ..........
2920+
2921+ **type **: ``array ``
2922+
2923+ 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.
2924+
2925+ envelope
2926+ ........
2927+
2928+ sender
2929+ """"""
2930+
2931+ **type **: ``string ``
2932+
2933+ Sender used by the ``Mailer ``. Keep in mind that this setting override a sender set in the code.
2934+
2935+ recipients
2936+ """"""""""
2937+
2938+ **type **: ``array ``
2939+
2940+ Recipients used by the ``Mailer ``. Keep in mind that this setting override recipients set in the code.
2941+
2942+ .. configuration-block ::
2943+
2944+ .. code-block :: yaml
2945+
2946+ # config/packages/mailer.yaml
2947+ framework :
2948+ mailer :
2949+ dsn : ' smtp://localhost:25'
2950+ envelope :
2951+ recipients : ['admin@symfony.com', 'lead@symfony.com']
2952+
2953+ .. code-block :: xml
2954+
2955+ <!-- config/packages/mailer.xml -->
2956+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2957+ <container xmlns =" http://symfony.com/schema/dic/services"
2958+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2959+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
2960+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
2961+ https://symfony.com/schema/dic/services/services-1.0.xsd
2962+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
2963+ <framework : config >
2964+ <framework : mailer dsn =" smtp://localhost:25" >
2965+ <framework : envelope >
2966+ <framework : recipients >admin@symfony.com</framework : recipients >
2967+ <framework : recipients >lead@symfony.com</framework : recipients >
2968+ </framework : envelope >
2969+ </framework : mailer >
2970+ </framework : config >
2971+ </container >
2972+
2973+ .. code-block :: php
2974+
2975+ // config/packages/mailer.php
2976+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
2977+ return static function (ContainerConfigurator $containerConfigurator): void {
2978+ $containerConfigurator->extension('framework', [
2979+ 'mailer' => [
2980+ 'dsn' => 'smtp://localhost:25',
2981+ 'envelope' => [
2982+ 'recipients' => [
2983+ 'admin@symfony.com',
2984+ 'lead@symfony.com',
2985+ ]
2986+ ]
2987+ ]
2988+ ]);
2989+ };
2990+
2991+ .. _mailer-headers :
2992+
2993+ headers
2994+ .......
2995+
2996+ **type **: ``array ``
2997+
2998+ Headers to add to emails. key (``name `` attribute in xml format)
2999+ is the header name and value the header value.
3000+
28913001workflows
28923002~~~~~~~~~
28933003
0 commit comments