You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mailer.rst
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -21,18 +21,14 @@ Transport Setup
21
21
---------------
22
22
23
23
Emails are delivered via a "transport". And without installing anything else, you
24
-
can deliver emails over ``smtp`` by configuring your ``.env`` file:
24
+
can deliver emails over ``smtp`` by configuring your ``.env`` file (the
25
+
``user``, ``pass`` and ``port`` parameters are optional):
25
26
26
27
.. code-block:: bash
27
28
28
29
# .env
29
30
MAILER_DSN=smtp://user:pass@smtp.example.com:port
30
31
31
-
The `user`, `pass` and `port` are optional. The port defaults to 25. If you have a custom port like 1025 which MailHog uses then the MAILER_DSN will be like this.
32
-
33
-
# .env
34
-
MAILER_DSN=smtp://localhost:1025
35
-
36
32
.. warning::
37
33
38
34
If you are migrating from Swiftmailer (and the Swiftmailer bundle), be
@@ -126,7 +122,7 @@ and create an :class:`Symfony\\Component\\Mime\\Email` object::
126
122
->subject('Time for Symfony Mailer!')
127
123
->text('Sending emails is fun again!')
128
124
->html('<p>See Twig integration for better HTML integration!</p>');
0 commit comments