Skip to content

Commit 0c767e6

Browse files
committed
minor #19134 [Testing] tip to not follow redirects when testing mailer (dbu)
This PR was merged into the 5.4 branch. Discussion ---------- [Testing] tip to not follow redirects when testing mailer lost some time trying to figure out why the mail assertions are not working for me... Commits ------- 4de910e tip to not follow redirects when testing mailer
2 parents a3fe108 + 4de910e commit 0c767e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mailer.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,11 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
15971597
}
15981598
}
15991599

1600+
.. tip::
1601+
1602+
If your controller returns a redirect response after sending the email, make sure to have your client *not* follow redirects.
1603+
The kernel is rebooted after following the redirection and the message lost from the mailer event handler.
1604+
16001605
.. _`Amazon SES`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Amazon/README.md
16011606
.. _`App Password`: https://support.google.com/accounts/answer/185833
16021607
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout

0 commit comments

Comments
 (0)