Unlock this challenge:
Why aren't emails sent for real with Mailtrap when running our tests?
Symfony disables the mailer service entirely in the test environment.
Emails fail to send in tests because the SMTP server is unreachable.
PHPUnit does not support email testing in Symfony.
Our Mailtrap credentials are configured in .env.local and Symfony doesn't load this file in the test environment.
.env.local
test