I have a php-fpm
container which should be sending mail to another container using Mailhog. The error message is:
Swift_TransportException: Connection could not be established with host mailhog [Connection refused #111]
The container definition looks like this:
mailhog:
image: mailhog/mailhog:latest
restart: unless-stopped
ports:
- 1025:1025
- 8025:8025
networks:
mine:
aliases:
-mailhog
The command to send mail is:
/usr/bin/mhsendmail --smtp-addr mailhog:1025
... which superficially seems to me to be everything that (the Mailhog docs say ...) I should need to make this work. So, what exactly can cause connection refused
?
Okay, I can see from other sources that this message means, "no process is listening or it's blocked by a firewall."