namshi / docker-smtp

SMTP docker container
MIT License
548 stars 199 forks source link

No connection could be made because the target machine actively refused it 127.0.0.1:25 #62

Closed rbflow closed 4 years ago

rbflow commented 4 years ago

Trying to use this container as a service in my docker-compose.yml this way however I'm receiving an error:

"No connection could be made because the target machine actively refused it 127.0.0.1:25"

  smtp:
    image: namshi/smtp
    container_name: jn_smtp_gmail
    environment:
      - RELAY_NETWORKS=:192.168.0.0/24
      - GMAIL_USER=<email>
      - GMAIL_PASSWORD=<password>    
    networks:
      - jn

Not sure what is wrong? Can you pls shed light on this?

Please note that I'm trying to call the container from a local application and not an internal container within the docker network

rbflow commented 4 years ago

port was missing. it works now!