Skip to content

Add a note about using Gmail vs an Email catcher #17586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ integration, CSS inlining, file attachments and a lot more. Get them installed w

$ composer require symfony/mailer


.. _mailer-transport-setup:

Transport Setup
Expand Down Expand Up @@ -105,14 +104,13 @@ native ``native://default`` Mailer uses the sendmail
Using a 3rd Party Transport
~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

================== ==============================================
Service Install with
================== ==============================================
Amazon SES ``composer require symfony/amazon-mailer``
Gmail ``composer require symfony/google-mailer``
MailChimp ``composer require symfony/mailchimp-mailer``
Mailgun ``composer require symfony/mailgun-mailer``
Mailjet ``composer require symfony/mailjet-mailer``
Expand All @@ -122,6 +120,14 @@ Sendinblue ``composer require symfony/sendinblue-mailer``
OhMySMTP ``composer require symfony/oh-my-smtp-mailer``
================== ==============================================

.. note::

As a convenience, Symfony also provides support for Gmail (``composer
require symfony/google-mailer``), but this should not be used in
production. In development, you should probably use an :ref:`email catcher
<mail-catcher>` instead. Note that most supported providers also provide a
free tier.

.. versionadded:: 5.2

The Sendinblue integration was introduced in Symfony 5.2.
Expand Down Expand Up @@ -1404,6 +1410,17 @@ is sent::
Development & Debugging
-----------------------

.. _mail-catcher:

Enabling an Email Catcher
~~~~~~~~~~~~~~~~~~~~~~~~~

When developing locally, it is recommended to use an email catcher. If you have
enabled Docker support via Symfony recipes, an email catcher is automatically
configured. In addition, if you are using the :doc:`Symfony local web server
</setup/symfony_server>`, the mailer DSN is automatically exposed via the
:ref:`symfony binary Docker integration <symfony-server-docker>`.

Disabling Delivery
~~~~~~~~~~~~~~~~~~

Expand Down