Just had an app die on me locally because the mail settings were outdated. Laravel Valet hit a Nginx 504 timeout error. When I checked the logs I saw
[2022-09-12 03:32:52] local.ERROR: Connection could not be established with host "mailtrap.io:2525": stream_socket_client(): Unable to connect to mailtrap.io:2525 (Operation timed out) {"userId":1,"exception":"[object] (Symfony\\Component\\Mailer\\Exception\\TransportException(code: 0): Connection could not be established with host \"mailtrap.io:2525\": stream_socket_client(): Unable to connect to mailtrap.io:2525 (Operation timed out) at /Users/me/code/smart48.com/smart48-v3/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:154)
[stacktrace]
#0 [internal function]: Symfony\\Component\\Mailer\\Transport\\Smtp\\Stream\\SocketStream->Symfony\\Component\\Mailer\\Transport\\Smtp\\Stream\\{closure}(2, 'stream_socket_c...', '/Users/me...', 157)
#1 /Users/me/code/site.com/smart48-v3/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php(157): stream_socket_client('mailtrap.io:252...', 0, '', 60.0, 4, Resource id #378)
So I realized I had to update my settings. Now using the new MAIL_MAILER and Mailhog instead of Mailtrap:
MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_EMAIL_ADDRESS=admin@site.test
MAIL_FROM_NAME="{APP_NAME}"