DEV Community

Sam
Sam

Posted on

How to use Mailhog (Docker) with Laravel 9

Get Mailhog going with:
docker run -d -p 1025:1025 -p 8025:8025 mailhog/mailhog

Update your Laravel env file to have:

MAIL_MAILER=smtp
MAIL_HOST=0.0.0.0
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Enter fullscreen mode Exit fullscreen mode

View your mailbox at http://localhost:8025.

Top comments (0)