Skip to content

Commit 4de910e

Browse files
committed
tip to not follow redirects when testing mailer
1 parent c8cdd53 commit 4de910e

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)