Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mailer] Add new events#47080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Mailer] Add new events#47080
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| { | ||
| public function __construct( | ||
| private RawMessage $message, | ||
| private \Throwable $error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why not public and no getter ?
For further potential BC handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't get it, there is agetError() method here 😕
…geEvent` (wkania)This PR was merged into the 6.4 branch.Discussion----------[Mailer] Mention the `SentMessageEvent` and `FailedMessageEvent`Thesymfony/symfony#47080 PR was created to solve the problem of [debugging](symfony/symfony#37570) and to get [information](symfony/symfony#42108) about email after it was sent.The section about [debugging](https://symfony.com/doc/current/mailer.html#debugging-emails) does not mention those events. Added some links for better navigation.For example what debug returns:```< 220 ESMTP SYMFONY.COM> EHLO [127.0.0.1]< 250-smtp.symfony.com< 250-PIPELINING< 250-SIZE 157286400< 250-AUTH PLAIN LOGIN PLAIN LOGIN PLAIN LOGIN< 250-AUTH=PLAIN LOGIN PLAIN LOGIN PLAIN LOGIN< 250-ENHANCEDSTATUSCODES< 250-8BITMIME< 250 SMTPUTF8> AUTH LOGIN< 334 VXNlcm5hbWU6> ZXhhbXBsZUBzeW1mb255LmNvbQ==< 334 UGFzc3dvcmQ6> U3ltcGhvbnkg.aXMgQXdlc29tZQ==< 235 2.7.0 Authentication successful> MAIL FROM:<example@symfony.com>< 250 2.1.0 Ok> RCPT TO:<dummy@symfony.com>< 250 2.1.5 Ok> DATA< 354 End data with <CR><LF>.<CR><LF>> .< 250 OK. ID: a20fb6ebbc54d22b```P.S.I see that the checks now can find repeated words:```mailer.rst ✘ 1765: The word "the" is used more times in a row. -> ``FailedMessageEvent`` allows acting on the the initial message in case of a failure and some```Commits-------8e3c1db [Mailer] Mention the SentMessageEvent and FailedMessageEvent in the debug section
Dispatching 2 new events:
SentMessageEventandFailedMessageEventwhen sending an email.It allows acting on the
SentMessageor the "initial" message in case of a failure.