We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a79bc7 commit 13aff44Copy full SHA for 13aff44
mailer.rst
@@ -1483,6 +1483,20 @@ the email is sent::
1483
// do something with the message
1484
}
1485
1486
+.. versionadded:: 6.3
1487
+
1488
+ The ``reject()`` method was introduced in Symfony 6.3.
1489
1490
+If you want to stop the Message from being sent, call ``reject()`` (it will
1491
+also stop the event propagation)::
1492
1493
+ use Symfony\Component\Mailer\Event\MessageEvent;
1494
1495
+ public function onMessage(MessageEvent $event): void
1496
+ {
1497
+ $event->reject();
1498
+ }
1499
1500
.. tip::
1501
1502
When using a ``MessageEvent`` listener to
0 commit comments