Skip to content
Dave Wilson edited this page Jun 10, 2019 · 4 revisions

Welcome to the MailHog wiki!

Recipes

Running MailHog on port 25 with docker compose

docker-compose.yml

version: "2.1"
services:
  smtp:
    image: mailhog/mailhog
    command: ["-smtp-bind-addr", "0.0.0.0:25"]
    user: root
    expose:
      - 25
      - 8025
    ports:
      - 8025:8025
    healthcheck:
      test: echo | telnet 127.0.0.1 25

from the containers declared on that same docker-compose.yml file, set the SMTP server to smtp:25.

Clone this wiki locally