@@ -47,12 +47,12 @@ By default, the only transport available in the mailer component is Smtp.
4747
4848Below is the list of other popular providers with built in support.
4949
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
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 ``
5656
5757For example to use google's gmail as a transport you need to install symfony/google-mailer.
5858
@@ -61,6 +61,7 @@ For example to use google's gmail as a transport you need to install symfony/goo
6161 $ composer require symfony/google-mailer
6262
6363 .. code-block :: php
64+
6465 use Symfony\Component\Mailer\Bridge\Google\Smtp\GmailTransport;
6566
6667 $transport = new GmailTransport('user', 'pass');
@@ -78,12 +79,12 @@ The mailer component provides a convenient way to create transport object from d
7879
7980Where ``$dns `` as one of the form below.
8081
81- - smtp://user:pass@gmail
82- - smtp://key@sendgrid
83- - smtp://null
84- - smtp://user:pass@mailgun
85- - http://key:domain@mailgun
86- - api://id@postmark
82+ - `` smtp://user:pass@gmail ``
83+ - `` smtp://key@sendgrid ``
84+ - `` smtp://null ``
85+ - `` smtp://user:pass@mailgun ``
86+ - `` http://key:domain@mailgun ``
87+ - `` api://id@postmark ``
8788
8889This provides a unified behaviour across all providers.
8990Easily switch from SMTP in dev to a "real" provider in production with same API.
@@ -108,15 +109,14 @@ If you want to send emails by using multiple transports in a round-robin fashion
108109Async
109110-----
110111
111- If you want to use the async functionality you need to install the `` messenger `` component.
112+ If you want to use the async functionality you need to install the :doc: ` Messenger component < /components/messenger >` .
112113
113114.. code-block :: terminal
114115
115116 $ composer require symfony/messenger
116117
117118 Then, instantiate and pass a ``MessageBus `` as a second argument to ``Mailer ``::
118119
119- .. code-block :: php
120120 use Symfony\Component\Mailer\Mailer;
121121 use Symfony\Component\Mailer\Messenger\MessageHandler;
122122 use Symfony\Component\Mailer\Messenger\SendEmailMessage;
@@ -126,8 +126,9 @@ Then, instantiate and pass a ``MessageBus`` as a second argument to ``Mailer``::
126126 use Symfony\Component\Messenger\MessageBus;
127127 use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
128128 use Symfony\Component\Mime\Address;
129-
130- // .. $dsn = 'smtp://null';
129+
130+ $dsn = 'change-dsn-accordingly';
131+
131132 $transport = Transport::fromDsn($dsn);
132133 $handler = new MessageHandler($transport);
133134
0 commit comments