From 403cc509d3823b3cefd56fa9bc4019f3f0c1b223 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 12 Dec 2019 17:50:44 +0100 Subject: [PATCH] [Mailer] Minor tweaks in the mailer docs --- mailer.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mailer.rst b/mailer.rst index aecb585eb87..4d54c3bef00 100644 --- a/mailer.rst +++ b/mailer.rst @@ -121,7 +121,9 @@ and create an :class:`Symfony\\Component\\Mime\\Email` object:: ->text('Sending emails is fun again!') ->html('

See Twig integration for better HTML integration!

'); - $mailer->send($email); + /** @var Symfony\Component\Mailer\SentMessage $sentEmail */ + $sentEmail = $mailer->send($email); + // $messageId = $sentEmail->getMessageId(); // ... } @@ -157,7 +159,8 @@ both strings or address objects:: Instead of calling ``->from()`` *every* time you create a new email, you can create an :doc:`event subscriber ` and listen to the - ``MessageEvent::class`` event to set the same ``From`` email to all messages. + :class:`Symfony\\Component\\Mailer\\Event\\MessageEvent` event to set the + same ``From`` email to all messages. Multiple addresses are defined with the ``addXXX()`` methods::