8000 [Testing] tip to not follow redirects when testing mailer by dbu · Pull Request #19134 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Testing] tip to not follow redirects when testing mailer #19134

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
tip to not follow redirects when testing mailer
  • Loading branch information
dbu committed Nov 14, 2023
commit 4de910e2a5413fb58cd788eadbcb8c867b72b855
5 changes: 5 additions & 0 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0