File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ and create an :class:`Symfony\\Component\\Mime\\Email` object::
121121 ->text('Sending emails is fun again!')
122122 ->html('<p>See Twig integration for better HTML integration!</p>');
123123
124- $mailer->send($email);
124+ /** @var Symfony\Component\Mailer\SentMessage $sentEmail */
125+ $sentEmail = $mailer->send($email);
126+ // $messageId = $sentEmail->getMessageId();
125127
126128 // ...
127129 }
@@ -157,7 +159,8 @@ both strings or address objects::
157159
158160 Instead of calling ``->from() `` *every * time you create a new email, you can
159161 create an :doc: `event subscriber </event_dispatcher >` and listen to the
160- ``MessageEvent::class `` event to set the same ``From `` email to all messages.
162+ :class: `Symfony\\ Component\\ Mailer\\ Event\\ MessageEvent ` event to set the
163+ same ``From `` email to all messages.
161164
162165Multiple addresses are defined with the ``addXXX() `` methods::
163166
You can’t perform that action at this time.
0 commit comments