Skip to content

Commit 22cf67a

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: Complete documentation about mailer integration Complete documentation about mailer integration [#14083] Revert mailer.headers option in 4.4 - 5.1
2 parents f662683 + b1a157b commit 22cf67a

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

mailer.rst

+16-8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
4646
xsi:schemaLocation="http://symfony.com/schema/dic/services
4747
https://symfony.com/schema/dic/services/services-1.0.xsd
4848
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
49+
4950
<framework:config>
5051
<framework:mailer dsn="%env(MAILER_DSN)%"/>
5152
</framework:config>
@@ -55,6 +56,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
5556
5657
// config/packages/mailer.php
5758
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
59+
5860
return static function (ContainerConfigurator $containerConfigurator): void {
5961
$containerConfigurator->extension('framework', [
6062
'mailer' => [
@@ -71,19 +73,25 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
7173
Using Built-in Transports
7274
~~~~~~~~~~~~~~~~~~~~~~~~~
7375

74-
============ ======================================== ==============================
76+
.. versionadded:: 5.2
77+
78+
The native protocol was introduced in Symfony 5.2.
79+
80+
============ ======================================== ==============================================================
7581
DSN protocol Example Description
76-
============ ======================================== ==============================
77-
smtp ``smtp://user:[email protected]:25`` Mailer uses an SMTP server to
78-
send emails
79-
sendmail ``sendmail://default`` Mailer uses the local sendmail
80-
binary to send emails
81-
============ ======================================== ==============================
82+
============ ======================================== ==============================================================
83+
smtp ``smtp://user:[email protected]:25`` Mailer uses an SMTP server to send emails
84+
sendmail ``sendmail://default`` Mailer uses the local sendmail binary to send emails
85+
native ``native://default`` Mailer uses the sendmail binary and options configured
86+
in the ``sendmail_path`` setting of ``php.ini``. On Windows
87+
hosts, Mailer fallbacks to ``smtp`` and ``smtp_port``
88+
``php.ini`` settings when ``sendmail_path`` is not configured.
89+
============ ======================================== ==============================================================
8290

8391
Using a 3rd Party Transport
8492
~~~~~~~~~~~~~~~~~~~~~~~~~~~
8593

86-
Instead of using your own SMTP server, you can send emails via a 3rd party
94+
Instead of using your own SMTP server or sendmail binary, you can send emails via a 3rd party
8795
provider. Mailer supports several - install whichever you want:
8896

8997
================== ==============================================

reference/configuration/framework.rst

+20-2
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Configuration
178178

179179
* :ref:`dsn <mailer-dsn>`
180180
* `transports`_
181+
* `message_bus`_
181182
* `envelope`_
182183

183184
* `sender`_
@@ -3009,6 +3010,18 @@ transports
30093010
A :ref:`list of DSN <multiple-email-transports>` that can be used by the
30103011
mailer. A transport name is the key and the dsn is the value.
30113012

3013+
message_bus
3014+
...........
3015+
3016+
.. versionadded:: 5.1
3017+
3018+
The ``message_bus`` option was introduced in Symfony 5.1.
3019+
3020+
**type**: ``string`` **default**: ``null`` or default bus if Messenger component is installed
3021+
3022+
Service identifier of the message bus to use when using the
3023+
:doc:`Messenger component </messenger>` (e.g. ``messenger.default_bus``).
3024+
30123025
envelope
30133026
........
30143027

@@ -3063,6 +3076,7 @@ recipients set in the code.
30633076
30643077
// config/packages/mailer.php
30653078
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
3079+
30663080
return static function (ContainerConfigurator $containerConfigurator): void {
30673081
$containerConfigurator->extension('framework', [
30683082
'mailer' => [
@@ -3082,10 +3096,14 @@ recipients set in the code.
30823096
headers
30833097
.......
30843098

3099+
.. versionadded:: 5.2
3100+
3101+
The ``headers`` mailer option was introduced in Symfony 5.2.
3102+
30853103
**type**: ``array``
30863104

3087-
Headers to add to emails. key (``name`` attribute in xml format)
3088-
is the header name and value the header value.
3105+
Headers to add to emails. The key (``name`` attribute in xml format) is the
3106+
header name and value the header value.
30893107

30903108
workflows
30913109
~~~~~~~~~

0 commit comments

Comments
 (0)