Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mailcatcher] 220 EventMachine SMTP Server #109

Open
itsa-sh opened this issue Jan 24, 2019 · 0 comments
Open

[Mailcatcher] 220 EventMachine SMTP Server #109

itsa-sh opened this issue Jan 24, 2019 · 0 comments

Comments

@itsa-sh
Copy link

itsa-sh commented Jan 24, 2019

When using Docker-compose trying to send email to mailcatcher from a separate container gets Connection refused. However if I test this via netcat I get the following error:

220 EventMachine SMTP Server

If I test the connection from my host it works, just inside of a docker network container to container.

nc -z 127.0.0.1 1025
Connection to 127.0.0.1 port 1025 [tcp/blackjack] succeeded!
nc -z 127.0.0.1 1080
Connection to 127.0.0.1 port 1080 [tcp/socks] succeeded!

The version of docker/compose is:

Docker version 18.09.0, build 4d60db4
docker-compose version 1.23.2, build 1110ad01

An example of the docker-compose.yml below:

version: '3.2'
services:

  php:
    image: example/trusty:php70
    ports:
      - 9000
    volumes:
      - .:/var/www
    networks:
      - internal

  mailcatcher:
    image: schickling/mailcatcher:latest
    ports:
      - "${DOCKER_PORT_MAILCATCHER_SMTP}:1025"
      - "${DOCKER_PORT_MAILCATCHER_HTTP}:1080"
    networks:
      - internal

networks:
  internal:

The values for the environments are as follows:

# .env content
DOCKER_PORT_MAILCATCHER_SMTP=1025
DOCKER_PORT_MAILCATCHER_HTTP=1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant