I am struggling to make MailHog work in my Laravel Homestead VM.
If I browse http://localhost:8025/, the web browser says it can't find it.
Then, in the command line, when executing $ mailhog, I get the following error:
Error listening on socket: listen tcp 0.0.0.0:1025: bind: address already in use
Moreover, if I execute $ mailhog --invite-jim then I get:
2021/09/13 22:49:22 Using in-memory storage 2021/09/13 22:49:22 [SMTP] Binding to address: 0.0.0.0:1025 [HTTP] Binding to address: 0.0.0.0:8025 2021/09/13 22:49:22 Serving under http://0.0.0.0:8025/ 2021/09/13 22:49:22 [SMTP] Error listening on socket: listen tcp 0.0.0.0:1025: bind: address already in use
Here is my .env config file
.env
MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
Does anyone know or can shed some light how to make MailHog work?
                        
Mailhog web interface is clearly listening at the 8025 port. The
localhostor127.0.0.1address may not work by default.Take a look at both the
/etc/hostsandHomestead.ymlfileLook for the address that Homestead is working on. In this case it's
192.168.10.10or192.168.56.56So now try
http://192.168.10.10:8025orhttp://192.168.56.56:8025And it should be working now