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::
121
121
->text('Sending emails is fun again!')
122
122
->html('<p>See Twig integration for better HTML integration!</p>');
123
123
124
- $mailer->send($email);
124
+ /** @var Symfony\Component\Mailer\SentMessage $sentEmail */
125
+ $sentEmail = $mailer->send($email);
126
+ // $messageId = $sentEmail->getMessageId();
125
127
126
128
// ...
127
129
}
@@ -157,7 +159,8 @@ both strings or address objects::
157
159
158
160
Instead of calling ``->from() `` *every * time you create a new email, you can
159
161
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.
161
164
162
165
Multiple addresses are defined with the ``addXXX() `` methods::
163
166
You can’t perform that action at this time.
0 commit comments