Configure Ghost transactional email over SMTP

Self-hosted Ghost sends staff invitations, password resets, member signups and member login links through the `mail` block in `config.production.json`. Newsletters are a separate path: Ghost delivers them only through Mailgun's bulk API and can't use SMTP, so this setup covers everything except newsletter sends.

Need an API key?

SMTP password is a Unitpost API key with emails:send. Username is always unitpost.

  • 5,000 emails/month
  • 3 API keys
  • 5 sending domains
Get free SMTP key
  1. Create a send-only key

    In Unitpost, open Settings → SMTP and create a send-only key. Ghost sends from mail.from, so use an address on a verified domain.

  2. Add the SMTP transport

    In config.production.json in your Ghost install directory, add a mail block. Ghost hands options to Nodemailer, so secure: false on port 587 upgrades with STARTTLS, and secure: true belongs with 465.

    JSON
    "mail": {
      "transport": "SMTP",
      "from": "Your Site <noreply@yourdomain.com>",
      "options": {
        "host": "smtp.unitpost.com",
        "port": 587,
        "secure": false,
        "auth": {
          "user": "unitpost",
          "pass": "pk_live_..."
        }
      }
    }

    Running Ghost in Docker? Every config key has an environment variable form with double underscores, such as mail__transport=SMTP, mail__options__host=smtp.unitpost.com and mail__options__auth__pass.

  3. Restart Ghost

    From the install directory, restart with Ghost-CLI so the new config loads. In Docker, recreate the container instead.

    Shell
    ghost restart
  4. Send a test

    Invite a staff user from Ghost Admin, or request a password reset from the /ghost sign-in page. The email shows up in Unitpost Emails.

  5. Newsletters stay on a bulk API

    Ghost's FAQ says newsletter delivery requires a bulk mail API and can't use SMTP, so the transport above never carries newsletters. Ghost doesn't require its built-in newsletter feature, though: you can export members and send newsletters as Unitpost campaigns instead.

Search docs and guides

Search the docs and product guides.