Skip to content

Commit 6d9da13

Browse files
committed
Minor tweaks
1 parent 0ea7ad3 commit 6d9da13

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

mailer.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -812,9 +812,10 @@ The :class:`Symfony\\Component\\Mailer\\SentMessage` object returned by the
812812
provides access to the original message (``getOriginalMessage()``) and to some
813813
debug information (``getDebug()``) such as the HTTP calls done by the HTTP
814814
transports, which is useful to debug errors.
815-
Access to :class:`Symfony\\Component\\Mailer\\SentMessage` can also be obtained by listening
816-
to the :ref:`SentMessageEvent <mailer-sent-message-event>`, and to ``getDebug()`` by listening
817-
to the :ref:`FailedMessageEvent <mailer-failed-message-event>`."
815+
816+
You can also access :class:`Symfony\\Component\\Mailer\\SentMessage` by listening
817+
to the :ref:`SentMessageEvent <mailer-sent-message-event>` and retrieve ``getDebug()``
818+
by listening to the :ref:`FailedMessageEvent <mailer-failed-message-event>`.
818819

819820
.. note::
820821

@@ -1730,18 +1731,17 @@ SentMessageEvent
17301731

17311732
``SentMessageEvent`` allows you to act on the :class:`Symfony\\Component\\\Mailer\\\SentMessage`
17321733
class to access the original message (``getOriginalMessage()``) and some
1733-
:ref:`debugging information <mailer-debugging-emails>` (``getDebug()``) such as the HTTP calls
1734-
made by the HTTP transports, which is useful for debugging errors::
1734+
:ref:`debugging information <mailer-debugging-emails>` (``getDebug()``) such as
1735+
the HTTP calls made by the HTTP transports, which is useful for debugging errors::
17351736

17361737
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
17371738
use Symfony\Component\Mailer\Event\SentMessageEvent;
17381739

17391740
public function onMessage(SentMessageEvent $event): void
17401741
{
1741-
// e.g you can get mail id
1742-
$event->getMessage();
1742+
$message $event->getMessage();
17431743

1744-
// do something with the message
1744+
// do something with the message (e.g. get its id)
17451745
}
17461746

17471747
Execute this command to find out which listeners are registered for this event
@@ -1762,9 +1762,9 @@ FailedMessageEvent
17621762

17631763
The ``FailedMessageEvent`` event was introduced in Symfony 6.2.
17641764

1765-
``FailedMessageEvent`` allows acting on the initial message in case of a failure and some
1766-
:ref:`debugging information <mailer-debugging-emails>` (``getDebug()``) such as the HTTP calls made
1767-
by the HTTP transports, which is useful for debugging errors::
1765+
``FailedMessageEvent`` allows acting on the initial message in case of a failure
1766+
and some :ref:`debugging information <mailer-debugging-emails>` (``getDebug()``)
1767+
such as the HTTP calls made by the HTTP transports, which is useful for debugging errors::
17681768

17691769
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
17701770
use Symfony\Component\Mailer\Event\FailedMessageEvent;

0 commit comments

Comments
 (0)