Skip to content

Commit e3e7eb2

Browse files
committed
minor #17586 Add a note about using Gmail vs an Email catcher (fabpot)
This PR was merged into the 5.4 branch. Discussion ---------- Add a note about using Gmail vs an Email catcher We have many people complaining about the difficulty to set up Gmail. But we should recommend not using it as this is not a good way to send emails from an application. I've also added a note about using an email catcher as I think this is the way to go in development (and automatically configured nowadays via our Docker integration). Commits ------- 0cae5b8 Add a note about using Gmail vs an Email catcher
2 parents daaeccf + 0cae5b8 commit e3e7eb2

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

mailer.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ integration, CSS inlining, file attachments and a lot more. Get them installed w
1212
1313
$ composer require symfony/mailer
1414
15-
1615
.. _mailer-transport-setup:
1716

1817
Transport Setup
@@ -105,14 +104,13 @@ native ``native://default`` Mailer uses the sendmail
105104
Using a 3rd Party Transport
106105
~~~~~~~~~~~~~~~~~~~~~~~~~~~
107106

108-
Instead of using your own SMTP server or sendmail binary, you can send emails via a 3rd party
109-
provider. Mailer supports several - install whichever you want:
107+
Instead of using your own SMTP server or sendmail binary, you can send emails
108+
via a 3rd party provider:
110109

111110
================== ==============================================
112111
Service Install with
113112
================== ==============================================
114113
Amazon SES ``composer require symfony/amazon-mailer``
115-
Gmail ``composer require symfony/google-mailer``
116114
MailChimp ``composer require symfony/mailchimp-mailer``
117115
Mailgun ``composer require symfony/mailgun-mailer``
118116
Mailjet ``composer require symfony/mailjet-mailer``
@@ -122,6 +120,14 @@ Sendinblue ``composer require symfony/sendinblue-mailer``
122120
OhMySMTP ``composer require symfony/oh-my-smtp-mailer``
123121
================== ==============================================
124122

123+
.. note::
124+
125+
As a convenience, Symfony also provides support for Gmail (``composer
126+
require symfony/google-mailer``), but this should not be used in
127+
production. In development, you should probably use an :ref:`email catcher
128+
<mail-catcher>` instead. Note that most supported providers also provide a
129+
free tier.
130+
125131
.. versionadded:: 5.2
126132

127133
The Sendinblue integration was introduced in Symfony 5.2.
@@ -1404,6 +1410,17 @@ is sent::
14041410
Development & Debugging
14051411
-----------------------
14061412

1413+
.. _mail-catcher:
1414+
1415+
Enabling an Email Catcher
1416+
~~~~~~~~~~~~~~~~~~~~~~~~~
1417+
1418+
When developing locally, it is recommended to use an email catcher. If you have
1419+
enabled Docker support via Symfony recipes, an email catcher is automatically
1420+
configured. In addition, if you are using the :doc:`Symfony local web server
1421+
</setup/symfony_server>`, the mailer DSN is automatically exposed via the
1422+
:ref:`symfony binary Docker integration <symfony-server-docker>`.
1423+
14071424
Disabling Delivery
14081425
~~~~~~~~~~~~~~~~~~
14091426

0 commit comments

Comments
 (0)