Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit296ff2b

Browse files
committed
minor#47052 [Mailer] Add a comment to avoid the same wrong PR over and over again (fabpot)
This PR was merged into the 5.4 branch.Discussion----------[Mailer] Add a comment to avoid the same wrong PR over and over again| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | no| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->| License | MIT| Doc PR | n/aCommits-------c695695 [Mailer] Add a comment to avoid the same wrong PR over and over again
2 parents8e34f9a +c695695 commit296ff2b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/Symfony/Component/Mailer/Mailer.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public function send(RawMessage $message, Envelope $envelope = null): void
4848
}
4949

5050
if (null !==$this->dispatcher) {
51+
// The dispatched event here has `queued` set to `true`; the goal is NOT to render the message, but to let
52+
// listeners do something before a message is sent to the queue.
53+
// We are using a cloned message as we still want to dispatch the **original** message, not the one modified by listeners.
54+
// That's because the listeners will run again when the email is sent via Messenger by the transport (see `AbstractTransport`).
55+
// Listeners should act depending on the `$queued` argument of the `MessageEvent` instance.
5156
$clonedMessage =clone$message;
5257
$clonedEnvelope =null !==$envelope ?clone$envelope : Envelope::create($clonedMessage);
5358
$event =newMessageEvent($clonedMessage,$clonedEnvelope, (string)$this->transport,true);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp