Skip to content

SMTP quickstart

If your application already sends mail over SMTP, switching to Mailway is a configuration change — no code. Your app authenticates against smtp.mailway.net, and Mailway relays each message through the providers you attached to the project, byte-for-byte.

  1. Create an SMTP credential.

    In the console, open SMTP credentials and create a credential for the project that should own this traffic. You get a username (mw_user_… — the credential’s own ID) and a password (mw_pass_… — the secret of the pair). Store the password in your secret manager; if you lose it, you can re-reveal it from the project’s Credentials tab.

  2. Point your app at Mailway.

    SMTP_HOST=smtp.mailway.net
    SMTP_PORT=587
    SMTP_USERNAME=mw_user_…
    SMTP_PASSWORD=mw_pass_…
    SMTP_ENCRYPTION=tls # STARTTLS
  3. Send something.

    Trigger any mail your app already sends. That’s it — the message shows up in the console’s Mails log within seconds, with its full delivery pipeline attached. If it doesn’t appear or shows an error, troubleshooting maps the symptom to a fix.

Mailway listens on seven SMTP ports, so there is always one your host can reach:

Port Protocol Notes
587 SMTP + STARTTLS The standard submission port — use this if you can.
465 SMTPS (implicit TLS) Legacy secure SMTP.
25 SMTP + STARTTLS Standard relay port.
2525, 2587, 588 SMTP + STARTTLS Alternates for clouds that block the standard ports.
2465 SMTPS (implicit TLS) Alternate for 465.

The alternates matter more than they look: GCP blocks outbound port 25 permanently, DigitalOcean blocks outbound 25, 465 and 587, and AWS blocks 25 by default. If your platform can’t reach a standard port, use 2587 (STARTTLS) or 2465 (implicit TLS) with the same credentials.

  • Mechanisms: PLAIN and LOGIN.
  • TLS is required before AUTH — the server refuses authentication on a plaintext connection. Use STARTTLS on the submission ports or implicit TLS on 465/2465.
  • Credentials are per-project. A credential can only send through the project it belongs to, so a leaked key is contained.

Mailway relays through your provider account, so inbox placement lives where it always did: verify your sending domain at your provider and keep SPF/DKIM/DMARC green on your DNS — see Deliverability for what each record does. If you’re on SES, the setup guide covers the exact records — including wiring real delivery/bounce events back into Mailway.

For staging and CI, use the sandbox: the same SMTP config against smtp.mailway.dev, or the Send API against api.mailway.dev with a mw_test_… key. Messages are accepted, stored, and visible in the console, but never forwarded automatically — nothing reaches a provider or a recipient unless you explicitly release a capture from the console.