From 585b8a3ce36d5a4b3419144e7c7f09e76da70afb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 8 Sep 2023 09:28:15 +0200 Subject: [PATCH] [Mailer] Mention that emails are async when using Messenger --- mailer.rst | 9 ++++++--- messenger.rst | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mailer.rst b/mailer.rst index 6fe753ae44c..844b2d8f760 100644 --- a/mailer.rst +++ b/mailer.rst @@ -398,9 +398,12 @@ and create an :class:`Symfony\\Component\\Mime\\Email` object:: } } -That's it! The message will be sent via the transport you configured. If the -transport is configured to :ref:`send emails asynchronously `, -the message won't be actually sent until :doc:`a worker consumes it `. +That's it! The message will be sent immediately via the transport you configured. +If you prefer to send emails asynchronously to improve performance, read the +:ref:`Sending Messages Async ` section. Also, if +your application has the :doc:`Messenger component ` installed, all +emails will be sent asynchronously by default +(but :ref:`you can change that `). Email Addresses ~~~~~~~~~~~~~~~ diff --git a/messenger.rst b/messenger.rst index d129d0f13e2..dc2a11a0acd 100644 --- a/messenger.rst +++ b/messenger.rst @@ -391,6 +391,8 @@ Then, in your handler, you can query for a fresh object:: This guarantees the entity contains fresh data. +.. _messenger-handling-messages-synchronously: + Handling Messages Synchronously ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~