From 4de910e2a5413fb58cd788eadbcb8c867b72b855 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Tue, 14 Nov 2023 15:39:11 +0100 Subject: [PATCH] tip to not follow redirects when testing mailer --- mailer.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mailer.rst b/mailer.rst index 844b2d8f760..0f8d11c627b 100644 --- a/mailer.rst +++ b/mailer.rst @@ -1597,6 +1597,11 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`:: } } +.. tip:: + + If your controller returns a redirect response after sending the email, make sure to have your client *not* follow redirects. + The kernel is rebooted after following the redirection and the message lost from the mailer event handler. + .. _`Amazon SES`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Amazon/README.md .. _`App Password`: https://support.google.com/accounts/answer/185833 .. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout