@@ -19,14 +19,6 @@ Installation
19
19
20
20
.. include :: /components/require_autoload.rst.inc
21
21
22
-
23
- Introduction
24
- ------------
25
-
26
- Symfony mailer is an experimental component introduced in 4.3 which
27
- will eventually replace swiftmailer.
28
-
29
-
30
22
Usage
31
23
-----
32
24
@@ -39,7 +31,7 @@ The Mailer component has two main classes: a ``Transport`` and the ``Mailer`` it
39
31
$mailer = new Mailer($transport);
40
32
$mailer->send($email);
41
33
42
- The `$email ` object is created via the :doc: `Mime component </components/mime >`.
34
+ The `` $email ` ` object is created via the :doc: `Mime component </components/mime >`.
43
35
44
36
Transport
45
37
---------
@@ -76,7 +68,8 @@ For example, suppose you want to use Google's Gmail. First, install it:
76
68
Use a DSN
77
69
---------
78
70
79
- The mailer component provides a convenient way to create transport object from DSN string::
71
+ The mailer component provides a convenient way to create transport object from
72
+ DSN string::
80
73
81
74
use Symfony\Component\Mailer\Transport;
82
75
@@ -91,8 +84,9 @@ Where ``$dsn`` as one of the form below.
91
84
- ``http://key:domain@mailgun ``
92
85
- ``api://id@postmark ``
93
86
94
- This provides a unified behaviour across all providers.
95
- Easily switch from SMTP in development to a "real" provider in production with same API.
87
+ This provides a unified behavior across all providers.
88
+ Easily switch from SMTP in development to a "real" provider in production
89
+ with same API.
96
90
97
91
Failover transport
98
92
------------------
@@ -101,20 +95,22 @@ You can create failover transport with the help of `||` operator::
101
95
102
96
$dsn = 'api://id@postmark || smtp://key@sendgrid';
103
97
104
- So if the first transport fails, the mailer will attempt to send through the second transport.
98
+ So if the first transport fails, the mailer will attempt to send through the
99
+ second transport.
105
100
106
101
Round Robin
107
102
-----------
108
103
109
- If you want to send emails by using multiple transports in a round-robin fashion, you can use the
110
- ``&& `` operator between the transports::
104
+ If you want to send emails by using multiple transports in a round-robin fashion,
105
+ you can use the ``&& `` operator between the transports::
111
106
112
107
$dsn = 'api://id@postmark && smtp://key@sendgrid'
113
108
114
109
Async
115
110
-----
116
111
117
- If you want to use the async functionality you need to install the :doc: `Messenger component </components/messenger >`.
112
+ If you want to use the async functionality you need to install the
113
+ :doc: `Messenger component </components/messenger >`.
118
114
119
115
.. code-block :: terminal
120
116
@@ -156,4 +152,4 @@ Learn More
156
152
-----------
157
153
158
154
To learn more about how to use the mailer component, refer to the
159
- :doc: `Symfony Framework Mailer documentation </mailer >`.
155
+ :doc: `Symfony Framework Mailer documentation </mailer >`.
0 commit comments