Skip to content

Configure SMTP

Mailify uses lettre and speaks stock SMTP. Any provider that gives you credentials for host:port + username:password over SMTPS/STARTTLS will work.

KeyValuesNotes
smtp.hoste.g. smtp.resend.comProvider’s SMTP endpoint.
smtp.port25, 587, 465, 1025587 = submission + STARTTLS, 465 = implicit TLS, 1025 = Mailpit local.
smtp.tlsnone, starttls, tlsMatch the port.
smtp.username / smtp.passwordstring / secretUsually from provider dashboard.

Rule of thumb

  • Port 587 → tls = "starttls".
  • Port 465 → tls = "tls".
  • Port 25 / 1025 → tls = "none".
[smtp]
host = "smtp.resend.com"
port = 587
tls = "starttls"
username = "resend"
# password = your Resend API key, from env MAILIFY_SMTP__PASSWORD
default_from_email = "you@yourdomain.com"

Get SMTP credentials from the SES console (different from your AWS access keys).

[smtp]
host = "email-smtp.us-east-1.amazonaws.com"
port = 587
tls = "starttls"
username = "AKIA..."
# password from MAILIFY_SMTP__PASSWORD
default_from_email = "no-reply@yourdomain.com"

Region suffix matters — pick the endpoint that matches where your SES identity is verified.

[smtp]
host = "smtp.mailgun.org"
port = 587
tls = "starttls"
username = "postmaster@mg.yourdomain.com"
# password from MAILIFY_SMTP__PASSWORD (Mailgun SMTP password, not the API key)

Use smtp.eu.mailgun.org if your domain is in the EU region.

[smtp]
host = "smtp-relay.brevo.com"
port = 587
tls = "starttls"
username = "<your-brevo-login-email>"
# password from MAILIFY_SMTP__PASSWORD (SMTP key, not API key)
[smtp]
host = "smtp.postmarkapp.com"
port = 587
tls = "starttls"
username = "<server-api-token>"
# password = same server-api-token

Postmark’s SMTP uses the same token as username and password.

[smtp]
host = "smtp.sendgrid.net"
port = 587
tls = "starttls"
username = "apikey" # literal string "apikey"
# password from MAILIFY_SMTP__PASSWORD (SendGrid API key)
[smtp]
host = "localhost" # or "mailpit" in docker-compose
port = 1025
tls = "none"

No auth. Inspect mail at http://localhost:8025.

Do not commit passwords to Mailify.toml. Load them from the environment:

[smtp]
host = "smtp.resend.com"
port = 587
tls = "starttls"
username = "resend"
# password intentionally omitted → comes from MAILIFY_SMTP__PASSWORD
Terminal window
# .env (gitignored)
MAILIFY_SMTP__PASSWORD=re_live_...

Or use a secret manager (Doppler, 1Password CLI, AWS Secrets Manager) and export the env var at process start.

From the running Mailify:

Terminal window
curl -s -X POST http://localhost:8080/mail/send-custom \
-H "authorization: Bearer $TOKEN" \
-H 'content-type: application/json' \
-d '{
"from": { "address": "no-reply@yourdomain.com" },
"to": [{ "address": "you@yourdomain.com" }],
"subject": "SMTP test from Mailify",
"html": "<p>It arrives.</p>",
"locale": "en"
}'

Then hit GET /mail/jobs/:id with the returned ULID until you see status: "Done".

If it fails, Debugging §5 shows how to bypass Mailify and test the provider directly with swaks.