Skip to content

Commit 9ad2b07

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: minor mailer component tweaks
2 parents 19217d8 + 40505d0 commit 9ad2b07

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

components/mailer.rst

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ Installation
2323
2424
.. include:: /components/require_autoload.rst.inc
2525

26-
27-
Introduction
28-
------------
29-
30-
Symfony mailer is an experimental component introduced in 4.3 which
31-
will eventually replace swiftmailer.
32-
33-
3426
Usage
3527
-----
3628

@@ -43,7 +35,7 @@ The Mailer component has two main classes: a ``Transport`` and the ``Mailer`` it
4335
$mailer = new Mailer($transport);
4436
$mailer->send($email);
4537

46-
The `$email` object is created via the :doc:`Mime component </components/mime>`.
38+
The ``$email`` object is created via the :doc:`Mime component </components/mime>`.
4739

4840
Transport
4941
---------
@@ -80,7 +72,8 @@ For example, suppose you want to use Google's Gmail. First, install it:
8072
Use a DSN
8173
---------
8274

83-
The mailer component provides a convenient way to create transport object from DSN string::
75+
The mailer component provides a convenient way to create transport object from
76+
DSN string::
8477

8578
use Symfony\Component\Mailer\Transport;
8679

@@ -95,8 +88,9 @@ Where ``$dsn`` as one of the form below.
9588
- ``http://key:domain@mailgun``
9689
- ``api://id@postmark``
9790

98-
This provides a unified behaviour across all providers.
99-
Easily switch from SMTP in development to a "real" provider in production with same API.
91+
This provides a unified behavior across all providers.
92+
Easily switch from SMTP in development to a "real" provider in production
93+
with same API.
10094

10195
Failover transport
10296
------------------
@@ -105,20 +99,22 @@ You can create failover transport with the help of `||` operator::
10599

106100
$dsn = 'api://id@postmark || smtp://key@sendgrid';
107101

108-
So if the first transport fails, the mailer will attempt to send through the second transport.
102+
So if the first transport fails, the mailer will attempt to send through the
103+
second transport.
109104

110105
Round Robin
111106
-----------
112107

113-
If you want to send emails by using multiple transports in a round-robin fashion, you can use the
114-
``&&`` operator between the transports::
108+
If you want to send emails by using multiple transports in a round-robin fashion,
109+
you can use the ``&&`` operator between the transports::
115110

116111
$dsn = 'api://id@postmark && smtp://key@sendgrid'
117112

118113
Async
119114
-----
120115

121-
If you want to use the async functionality you need to install the :doc:`Messenger component </components/messenger>`.
116+
If you want to use the async functionality you need to install the
117+
:doc:`Messenger component </components/messenger>`.
122118

123119
.. code-block:: terminal
124120
@@ -160,4 +156,4 @@ Learn More
160156
-----------
161157

162158
To learn more about how to use the mailer component, refer to the
163-
:doc:`Symfony Framework Mailer documentation </mailer>`.
159+
:doc:`Symfony Framework Mailer documentation </mailer>`.

0 commit comments

Comments
 (0)