@@ -23,14 +23,6 @@ Installation
23
23
24
24
.. include :: /components/require_autoload.rst.inc
25
25
26
-
27
- Introduction
28
- ------------
29
-
30
- Symfony mailer is an experimental component introduced in 4.3 which
31
- will eventually replace swiftmailer.
32
-
33
-
34
26
Usage
35
27
-----
36
28
@@ -43,7 +35,7 @@ The Mailer component has two main classes: a ``Transport`` and the ``Mailer`` it
43
35
$mailer = new Mailer($transport);
44
36
$mailer->send($email);
45
37
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 >`.
47
39
48
40
Transport
49
41
---------
@@ -80,7 +72,8 @@ For example, suppose you want to use Google's Gmail. First, install it:
80
72
Use a DSN
81
73
---------
82
74
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::
84
77
85
78
use Symfony\Component\Mailer\Transport;
86
79
@@ -95,8 +88,9 @@ Where ``$dsn`` as one of the form below.
95
88
- ``http://key:domain@mailgun ``
96
89
- ``api://id@postmark ``
97
90
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.
100
94
101
95
Failover transport
102
96
------------------
@@ -105,20 +99,22 @@ You can create failover transport with the help of `||` operator::
105
99
106
100
$dsn = 'api://id@postmark || smtp://key@sendgrid';
107
101
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.
109
104
110
105
Round Robin
111
106
-----------
112
107
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::
115
110
116
111
$dsn = 'api://id@postmark && smtp://key@sendgrid'
117
112
118
113
Async
119
114
-----
120
115
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 >`.
122
118
123
119
.. code-block :: terminal
124
120
@@ -160,4 +156,4 @@ Learn More
160
156
-----------
161
157
162
158
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