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