Skip to content

[Mailer][Messenger] Mention that emails are async when using Messenger #18848

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
Sep 8, 2023
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <mailer-sending-messages-async>`,
the message won't be actually sent until :doc:`a worker consumes it <messenger-worker>`.
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 <mailer-sending-messages-async>` section. Also, if
your application has the :doc:`Messenger component </messenger>` installed, all
emails will be sent asynchronously by default
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
emails will be sent asynchronously by default
emails will be sent asynchronously by default (you will need to have a worker/consumer running)

isnt it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes ... but I think that at this point that is "an implementation detail". All this, and more, is explained in the linked section. That's why I think it's not necessary to repeat it here.

(but :ref:`you can change that <messenger-handling-messages-synchronously>`).

Email Addresses
~~~~~~~~~~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down