Back to blog

Send your Logto authentication emails through MailJunky

August 20, 2026MailJunky Team

Authentication emails are the most deliverability-critical emails your product sends. A marketing email that lands in spam is a missed opportunity. A verification code that lands in spam is a user who can't sign in. Those emails have to arrive, and they have to arrive fast.

Logto is one of the best open-source identity platforms around, and it ships a native MailJunky email connector. Instead of running your own SMTP box, you drop in a MailJunky API key and Logto sends its auth emails through MailJunky's HTTP API — from your own verified domain, with the deliverability tooling and analytics those emails demand.

How the connector works

Logto's MailJunky connector calls MailJunky's email API (POST /api/v1/emails/send) with your API key as a Bearer token. You configure four things in the Logto Console:

  • API Key — your MailJunky key (mj_live_…, or mj_test_… while you're testing).
  • From Email — a verified sender address in MailJunky.
  • From Name — an optional display name for the From header.
  • Templates — a JSON array mapping each Logto flow to a subject and body.

That's it. No SMTP host, no port, no credentials juggling.

Why route Logto's auth emails through MailJunky

Logto handles the identity logic. MailJunky handles getting the email to the inbox:

Delivery from a verified custom domain. MailJunky only sends from domains you've verified with DKIM, SPF, and a dedicated return-path, so your verification codes arrive signed and aligned from yourapp.com, not a shared IP.

Per-domain reputation. Auth traffic is transactional and spiky. MailJunky tracks reputation per domain and keeps your login stream isolated from any marketing you send, so a promotional campaign can never drag down what your sign-in flow depends on.

Real-time analytics. You get delivery, open, click, and bounce data on your verification codes, magic links, and password resets — the same as any other MailJunky send. When a user says "I never got the code," you can see exactly what happened.

Setting it up

  1. Create a MailJunky account at mailjunky.ai.
  2. Verify your sending domain. Add the domain your auth emails will come from and add the DNS records we generate. MailJunky won't send from a domain until it's verified.
  3. Create an API key with permission to send email.
  4. Add the MailJunky connector in the Logto Console and paste your configuration: API key, From email, optional From name, and your templates.

Templates

The templates field is a JSON array. Each entry maps one Logto flow to an email:

[
  {
    "usageType": "Register",
    "type": "text/plain",
    "subject": "Verify your email",
    "content": "Your verification code is {{code}}."
  }
]

Each object supports:

  • usageType — the Logto flow, e.g. Register, SignIn, ForgotPassword, Generic, OrganizationInvitation, MfaVerification, and more.
  • subject — the email subject; supports Handlebars placeholders like {{code}} and {{link}}.
  • content — the body (HTML or plain text), also with Handlebars placeholders.

At minimum, define templates for Register, SignIn, ForgotPassword, and Generic. If Logto hits a flow you haven't templated, it falls back to your Generic template — so that one's your safety net.

Getting started

If you're already running Logto, create a MailJunky account, verify a domain, create an API key, and add the MailJunky connector in your Logto Console. Once it's in, Logto's verification, magic-link, and password-reset flows all deliver through MailJunky automatically — and every one of those messages shows up in your dashboard with full delivery analytics.

Questions about setting it up? Reach us at [email protected].