Skip to content

Commit 91a028a

Browse files
hariktweaverryan
authored andcommitted
update with changes and same format as currently merged mailer
1 parent b51e32c commit 91a028a

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

components/mailer.rst

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Installation
2525
Introduction
2626
------------
2727

28+
Symfony mailer is an experimental component introduced in 4.3 which
29+
will eventually replace swiftmailer.
30+
2831

2932
Usage
3033
-----
@@ -47,14 +50,18 @@ By default, the only transport available in the mailer component is Smtp.
4750

4851
Below is the list of other popular providers with built in support.
4952

50-
- Amazon SES: ``symfony/amazon-mailer``
51-
- Google Gmail: ``symfony/google-mailer``
52-
- Mandrill: ``symfony/mailchimp-mailer``
53-
- Mailgun: ``symfony/mailgun-mailer``
54-
- Postmark: ``symfony/postmark-mailer``
55-
- Sendgrid: ``symfony/sendgrid-mailer``
53+
================== =============================================
54+
Service Install with
55+
================== =============================================
56+
Amazon SES ``composer require symfony/amazon-mailer``
57+
Gmail ``composer require symfony/google-mailer``
58+
MailChimp ``composer require symfony/mailchimp-mailer``
59+
Mailgun ``composer require symfony/mailgun-mailer``
60+
Postmark ``composer require symfony/postmark-mailer``
61+
SendGrid ``composer require symfony/sendgrid-mailer``
62+
================== =============================================
5663

57-
For example to use google's gmail as a transport you need to install symfony/google-mailer.
64+
For example, suppose you want to use Google's Gmail. First, install it:
5865

5966
.. code-block:: terminal
6067
@@ -68,16 +75,16 @@ For example to use google's gmail as a transport you need to install symfony/goo
6875
$mailer = new Mailer($transport);
6976
$mailer->send($email);
7077
71-
Use a Dsn
78+
Use a DSN
7279
---------
7380

74-
The mailer component provides a convenient way to create transport object from dsn string::
81+
The mailer component provides a convenient way to create transport object from DSN string::
7582

7683
use Symfony\Component\Mailer\Transport;
7784

7885
$transport = Transport::fromDsn($dsn);
7986

80-
Where ``$dns`` as one of the form below.
87+
Where ``$dsn`` as one of the form below.
8188

8289
- ``smtp://user:pass@gmail``
8390
- ``smtp://key@sendgrid``
@@ -87,7 +94,7 @@ Where ``$dns`` as one of the form below.
8794
- ``api://id@postmark``
8895

8996
This provides a unified behaviour across all providers.
90-
Easily switch from SMTP in dev to a "real" provider in production with same API.
97+
Easily switch from SMTP in development to a "real" provider in production with same API.
9198

9299
Failover transport
93100
------------------
@@ -145,4 +152,4 @@ Then, instantiate and pass a ``MessageBus`` as a second argument to ``Mailer``::
145152
[
146153
new Address('recepient@example.com'),
147154
]
148-
));
155+
));

0 commit comments

Comments
 (0)