Skip to content

Commit 2870f49

Browse files
committed
Minor tweaks
1 parent 7b0b500 commit 2870f49

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

mailer.rst

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,21 +1428,26 @@ is sent::
14281428
// do something with the message
14291429
}
14301430

1431-
Execute this command to find out which listeners are registered for this event and
1432-
their priorities:
1431+
Execute this command to find out which listeners are registered for this event
1432+
and their priorities:
14331433

14341434
.. code-block:: terminal
14351435
14361436
$ php bin/console debug:event-dispatcher "Symfony\Component\Mailer\Event\MessageEvent"
14371437
14381438
SentMessageEvent
1439-
~~~~~~~~~~~~
1439+
~~~~~~~~~~~~~~~~
14401440

14411441
**Event Class**: :class:`Symfony\\Component\\Mailer\\Event\\SentMessageEvent`
14421442

1443-
``SentMessageEvent`` it allows you to act on the :class:`Symfony\\Component\\\Mailer\\\SentMessage` to access the original
1444-
message (getOriginalMessage()) and some debugging information (getDebug()) such as
1445-
the HTTP calls made by the HTTP transports, which is useful for debugging errors::
1443+
.. versionadded:: 6.2
1444+
1445+
The ``SentMessageEvent`` event was introduced in Symfony 6.2.
1446+
1447+
``SentMessageEvent`` allows you to act on the :class:`Symfony\\Component\\\Mailer\\\SentMessage`
1448+
class to access the original message (``getOriginalMessage()``) and some debugging
1449+
information (``getDebug()``) such as the HTTP calls made by the HTTP transports,
1450+
which is useful for debugging errors::
14461451

14471452
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
14481453
use Symfony\Component\Mailer\Event\SentMessageEvent;
@@ -1458,42 +1463,42 @@ the HTTP calls made by the HTTP transports, which is useful for debugging errors
14581463
// do something with the message
14591464
}
14601465

1461-
Execute this command to find out which listeners are registered for this event and
1462-
their priorities:
1466+
Execute this command to find out which listeners are registered for this event
1467+
and their priorities:
14631468

14641469
.. code-block:: terminal
14651470
14661471
$ php bin/console debug:event-dispatcher "Symfony\Component\Mailer\Event\SentMessageEvent"
14671472
14681473
FailedMessageEvent
1469-
~~~~~~~~~~~~
1474+
~~~~~~~~~~~~~~~~~~
14701475

14711476
**Event Class**: :class:`Symfony\\Component\\Mailer\\Event\\FailedMessageEvent`
14721477

1473-
``FailedMessageEvent`` it allows acting on the the initial message in case of a failure::
1478+
.. versionadded:: 6.2
1479+
1480+
The ``FailedMessageEvent`` event was introduced in Symfony 6.2.
1481+
1482+
``FailedMessageEvent`` allows acting on the the initial message in case of a failure::
14741483

14751484
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
14761485
use Symfony\Component\Mailer\Event\FailedMessageEvent;
14771486

14781487
public function onMessage(FailedMessageEvent $event): void
14791488
{
1480-
// e.g you can get more information on this error when sending an email.
1489+
// e.g you can get more information on this error when sending an email
14811490
$event->getError();
14821491
14831492
// do something with the message
14841493
}
14851494

1486-
Execute this command to find out which listeners are registered for this event and
1487-
their priorities:
1495+
Execute this command to find out which listeners are registered for this event
1496+
and their priorities:
14881497

14891498
.. code-block:: terminal
14901499
14911500
$ php bin/console debug:event-dispatcher "Symfony\Component\Mailer\Event\FailedMessageEvent"
14921501
1493-
.. versionadded:: 6.2
1494-
1495-
``SentMessageEvent`` and ``FailedMessageEvent`` were introduced in Symfony 6.2.
1496-
14971502
Development & Debugging
14981503
-----------------------
14991504

0 commit comments

Comments
 (0)