laravel / sail

Docker files for running a basic Laravel application.
https://laravel.com/docs/sail
MIT License
1.65k stars 470 forks source link

Update MAILER config to use mailpit on L11 #678

Closed SamuelMwangiW closed 6 months ago

SamuelMwangiW commented 6 months ago

Why?

Laravel 11 ships with the log driver as the default driver.

In Laravel 10, the default MAIL_PORT and MAIL_MAILER values matched the values expected to work with mailpit out of the box hence these values were not necessary to update.

Running php artisan sail:install --with mailpit on a fresh Laravel 11 project results in the following .env config

MAIL_MAILER=log
MAIL_HOST=mailpit
MAIL_PORT=2525

This still sends the emails to the log file for a user installing mailpit with sail in Laravel 11. This PR improves that DX by configuring the application to use mailpit by default for said users out of the box.

github-actions[bot] commented 6 months ago

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.