Mailers

Configuring Mailers, Transports, and Failover

config/mail.php defines named mailers, each with a transport, and MAIL_MAILER picks the default. The transports are Symfony Mailer 8.1 1,596 's (Symfony Mailer): smtp, sendmail, and the SES, Postmark 23,738 , Resend 17,150 , Mailgun 23,097 and Cloudflare 2 APIs, which the docs prefer to SMTP; log and array keep mail local. Mailpit (https://github.com/axllent/mailpit 10,468 ) (MIT, 1.31.2) catches everything in a web inbox: docker run -d -p 1017:1025 -p 8017:8025 axllent/mailpit, then MAIL_MAILER=smtp, MAIL_HOST=127.0.0.1 and MAIL_PORT=1017.

roundrobin spreads messages across mailers, and failover tries each in order; the skeleton's is smtp then log. With MAIL_MAILER=failover and nothing on the SMTP port, a send succeeded:

Output of 164
$ grep -o 'local\.[A-Z]*: [^{]*' storage/logs/laravel.log | head -2
local.ERROR: Transport "smtp://127.0.0.1:1099" failed.
local.DEBUG: From: Bookshop Orders <orders@example.com>

In production, chain two real providers and leave log out, or an outage files mail in a log.