pygmystack / pygmy-legacy

Use pygmystack/pygmy instead
https://github.com/pygmystack/pygmy
MIT License
25 stars 16 forks source link

Unable to connect to Mailhog from container #19

Closed todeveni closed 5 years ago

todeveni commented 6 years ago

With cachalot I was able to send mail from PHP application/container to Mailhog by using ssmtp config mailhub=mailhog.docker.amazee.io:1025. Outgoing mail was routed to Mailhog perfectly.

Upgrading to pygmy this doesn't work anymore. Apparently the 1025 port isn't forwarded/linked to Mailhog anymore.

Trying with telnet from PHP container:

root@309fadbe2c8d:/var/www/html# telnet mailhog.docker.amazee.io 1025
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Am I doing something wrong or is this a bug?

dasrecht commented 5 years ago

Hi @todeveni

I shortly checked that and it seems to work without any issues. Note you'll need to connect via the IP internally

[drupal-example]cli-drupal:/app$ telnet 172.17.0.1 1025
220 mailhog.example ESMTP MailHog