Skip to content

Catching Outgoing Mail

The edge stack includes a shared Mailcatcher so mail your projects send during development never leaves your machine — it lands in a web inbox instead.

Every project should send its SMTP output to mailcatcher:1025 — the container’s hostname on the shared edge network. In compose or your app config, set the mailer host to mailcatcher and the port to 1025.

The configured mail domain works as an SMTP host too: it is a network alias on the edge network, so smtp://mail.coding9.test:1025 reaches the same container from inside any project.

For Shopware, either set it in .env:

.env
MAILER_DSN=smtp://mailcatcher:1025

…or in the admin under Settings → System → Mailer, mode “SMTP server”: host mailcatcher (or the mail domain), port 1025, no encryption, no credentials.

The shopware-dockware profile wires this up for you. Its override sets the relevant environment variables on the shop container automatically:

shopware-dockware profile (excerpt)
environment:
MAILER_DSN: "smtp://mailcatcher:1025"
MAILER_URL: "smtp://mailcatcher:1025"
MAIL_HOST: "mailcatcher"
MAIL_PORT: "1025"

The Mailcatcher UI is served over HTTPS at the configured mail domain (default mail.<primary-base-domain>):

open the inbox
open https://mail.coding9.test

Because Mailcatcher lives in the edge stack, a single inbox collects mail from all your running projects at once.

The domain is configurable via mdocker config mail (key MD_MAIL_DOMAIN in config.env; default mail.<primary-base-domain>):

mdocker config mail
mdocker config mail # show domain, UI URL and SMTP URL
mdocker config mail set post.coding9.test
mdocker config mail reset # back to mail.<primary>

Setting or resetting re-renders the edge override and recreates the edge stack (your projects keep running). Pick a name one level below a configured base domain — the wildcard certificate (*.<base-domain>) and the macOS resolver only cover that; the CLI warns otherwise.

The macOS app shows the same information — Web UI link, copyable SMTP URLs and the shop setup notes — under Settings → Edge-Stack → Mailcatcher.