minmaxkey

Email delivery

Email delivery

Buyer pays → the license key lands in their inbox. Renewal → a short note. That's the whole job — and it should take you two minutes, not an afternoon.

Pick one backend (priority order if you set several: Resend → Postmark → SMTP):

Backend Setup You need
Resend ~2 minutes an API key
Postmark ~5 minutes a server token
SMTP you already have a mail server host + credentials + SPF/DKIM patience
  1. Sign up at resend.com — the free tier (100/day) is plenty to start.
  2. Domains → Add domain, follow their three DNS records (or, to try the loop today before buying anything, use their test sender and send to your own inbox).
  3. API keys → Create. It starts with re_.
  4. Two env vars on your MinMaxKey server:

bash MMK_RESEND_API_KEY=re_AbC123... MMK_EMAIL_FROM=YourApp <[email protected]> # must be on your verified domain

  1. Restart, then press send test email on the product page (or mmk-admin mail test --to [email protected]). Done.

Postmark

  1. Create a server at postmarkapp.com, add and verify a Sender Signature for your from-address.
  2. Copy the Server Token from the server's Credentials tab:

bash MMK_POSTMARK_TOKEN=... MMK_EMAIL_FROM=YourApp <[email protected]> # your verified signature

  1. Test email button → done.

SMTP (classic)

If you already run a mail server (mail.yourdomain.com):

MMK_SMTP_HOST=mail.yourdomain.com
MMK_SMTP_PORT=465            # 587 for STARTTLS
MMK_SMTP_SSL=true            # port 465; for 587 leave it off (STARTTLS is default)
[email protected]
MMK_SMTP_PASS=...
MMK_EMAIL_FROM=YourApp <[email protected]>

The honest caveat: with SMTP you own deliverability — publish SPF and DKIM for your domain or key emails land in spam. That's the chore Resend/Postmark remove.

The sender address

MMK_EMAIL_FROM is the sender for every backend, and it must be a verified sender at the provider (a verified domain in Resend, a confirmed signature in Postmark). MMK_SMTP_FROM still works as the sender if you prefer one variable for everything.

Testing & troubleshooting

The test surfaces — dashboard send test email button, mmk-admin mail test --to ..., POST /v1/mail/test — send a real email and show the provider's own error message when something's wrong. GET /v1/mail/status (and mmk-admin mail status) tells you which backend is active.

What you see What it means
no email backend configured none of the env vars are set (or the container didn't pick them up — check deploy/.env + restart)
Resend HTTP 403: from address not verified MMK_EMAIL_FROM isn't on your verified Resend domain (or you're using a domain you haven't added)
Postmark HTTP 422: Sender not confirmed the from-address has no confirmed Sender Signature
Resend/Postmark HTTP 401 wrong API key / server token
SMTP connection failed host/port/TLS combo wrong, or the server blocks your IP
emails land in spam SPF/DKIM missing for your sending domain (SMTP); with Resend/Postmark, follow their domain-setup docs
nothing happens on purchase email is a background nicety, never a blocker: keys are always visible in the dashboard and in the Stripe webhook response — but fix mail before real customers buy

What gets sent

  • On checkout (one-time purchase, or the first subscription invoice): the license key, with a note about keeping it private and how seat resets work.
  • On renewal: a short "renewed, valid until …" note.
  • Both fire for every license creation that carries a customer email — dashboard issue, native Stripe, or webhook-driven issue from another provider.