Skip to content

[Mailer] Add a note about how to use the Gmail provider #17612

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 26, 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
12 changes: 11 additions & 1 deletion mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ party provider:
Provider SMTP HTTP API
==================== ==================================================== =========================================== ========================================
Amazon SES ses+smtp://USERNAME:PASSWORD@default ses+https://ACCESS_KEY:SECRET_KEY@default ses+api://ACCESS_KEY:SECRET_KEY@default
Google Gmail gmail+smtp://USERNAME:PASSWORD@default n/a n/a
Google Gmail gmail+smtp://USERNAME:APP-PASSWORD@default n/a n/a
Mailchimp Mandrill mandrill+smtp://USERNAME:PASSWORD@default mandrill+https://KEY@default mandrill+api://KEY@default
Mailgun mailgun+smtp://USERNAME:PASSWORD@default mailgun+https://KEY:DOMAIN@default mailgun+api://KEY:DOMAIN@default
Mailjet mailjet+smtp://ACCESS_KEY:SECRET_KEY@default n/a mailjet+api://ACCESS_KEY:SECRET_KEY@default
Expand Down Expand Up @@ -214,6 +214,15 @@ OhMySMTP ohmysmtp+smtp://API_TOKEN@default n/a
The usage of ``default_socket_timeout`` as the default timeout was
introduced in Symfony 5.1.

.. note::

To use Google Gmail, you must have a Google Account with 2-Step-Verification (2FA)
enabled and you must use `App Password`_ to authenticate. Also note that Google
revokes your App Passwords when you change your Google Account password and then
you need to generate a new one.
Using other methods (like ``XOAUTH2`` or the ``Gmail API``) are not supported currently.
You should use Gmail for testing purposes only and use a real provider in production.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this last sentence as we already have such a warning in this doc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 81f5137


.. tip::

If you want to override the default host for a provider (to debug an issue using
Expand Down Expand Up @@ -1564,3 +1573,4 @@ you can use the built in assertions::
.. _`PEM encoded`: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt
.. _`App Password`: https://support.google.com/accounts/answer/185833