Closed vlados closed 6 years ago
Mailhog is running out of the box.
The ENV variable POSTFIX_RELAYHOST=[mail]:1025
causes every sendmail command inside the app container to be redirected to the mailhog container.
If you use a PHP framework/application that has its own SMTP configuration, you can use this configuration:
SMTP-Host: mail
SMTP-Port: 1025
You don't need to specify any encryption, user or password.
Mailhog itself provides a HTTP interface that is running on port 8025 and can either be reached at http://mail.boilerplate.docker or http://boilerplate.docker:8025 (depending wether you use reverse proxy or not).
I've tested every possible way to use mailhog as mail catcher but I always get this: