How to Configure Ghost Email with Resend: A Complete Step-by-Step Guide

How to Configure Ghost Email with Resend: A Complete Step-by-Step Guide

If you're running a self-hosted Ghost blog and looking for a reliable email provider, Resend is an excellent choice. In this guide, we'll walk through how to set up Ghost to send emails via Resend SMTP, covering everything from domain verification to debugging connection errors.


๐Ÿ” What is Resend?

Resend is a modern email API service that allows developers to send transactional and marketing emails using a clean and developer-friendly interface. Think of it as a newer, simpler alternative to services like Mailgun, SendGrid, or Postmark.

๐Ÿš€ Why Use Resend with Ghost?

  • Fast setup
  • Free tier with generous limits
  • Clean API and reliable delivery
  • Domain verification and link tracking support
  • Easy integration with Ghost via SMTP

๐Ÿง  Prerequisites

  • A self-hosted Ghost blog (Docker or systemd based)
  • An account on resend.com
  • Access to your domain's DNS provider (e.g., Namecheap, Cloudflare)
  • Terminal access to your Ghost instance

๐Ÿ“ Don't Have a Domain Yet?

No worries! If you don't have a domain, you can still test Ghost email functionality using Resend's default sandbox domain, or use their service with a non-verified sender like onboarding@resend.dev.

However, this is only suitable for testing purposes. Most production email clients will mark such emails as spam or reject them due to missing authentication (SPF, DKIM).

๐Ÿ”„ Suggested Options:

  • Buy a cheap domain from providers like Namecheap or GoDaddy
  • Use Resendโ€™s built-in sender onboarding@resend.dev just for internal tests (not for production)
  • Test with swaks CLI tool (covered later in this guide)

If you want to buy a domain:

  1. Visit namecheap.com or google domains
  2. Register a simple domain (e.g., myblogproject.xyz)
  3. Point its DNS to Resend as shown in the next steps

โœ… Step 1: Add Your Domain to Resend

  1. Log in to resend.com
  2. Navigate to Domains and click "Add Domain"
  3. Enter your domain, e.g. jameskaranja.me
  4. Resend will provide DNS records to add:
Type Name Value
TXT resend._domainkey DKIM key
TXT @ (root) v=spf1 include:resend.com ~all
CNAME emails emails.resend.com (optional for tracking)
  1. Add these to your domain's DNS panel (e.g. Namecheap > Advanced DNS)
  2. Wait for the domain to be verified in the Resend dashboard

๐Ÿ› ๏ธ Step 2: Configure SMTP in Ghost

Edit your Ghost config.production.json file, usually located at /var/lib/ghost/config.production.json.

Here's a working example:

{
  "url": "http://localhost:2368",
  "server": {
    "port": 2368,
    "host": "::"
  },
  "mail": {
    "from": "noreply@jameskaranja.me",
    "transport": "SMTP",
    "options": {
      "host": "smtp.resend.com",
      "port": 2587,
      "secure": true,
      "auth": {
        "user": "resend",
        "pass": "your-resend-api-key"
      }
    }
  },
  "logging": {
    "transports": ["file", "stdout"]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/lib/ghost/content"
  }
}
๐Ÿ“ Note:Use port 2587 with `secure: tree for STARTTLS (as we tested)You can also try port 465 with secure: true (didn't work for our setup due to ESP limits or network blocks, DIGITAL OCEAN DROPLET)Port 2465 and invalid TLS combos caused ESOCKET errors during testing

๐Ÿ” Step 3: Restart Ghost

Depending on your environment:

Docker:

docker restart <ghost_container_name>

Systemd:

ghost restart

๐Ÿงช Step 4: Test Email Functionality

Try sending an invite or triggering a login link from the Ghost admin panel. If configured correctly, you should receive an email from noreply@yourdomain.com.


๐Ÿ› Debugging Tips (From Real Experience)

We encountered these issues along the way:

  • 500 Error on Login: Caused by SMTP misconfiguration
  • ESOCKET Error: Using wrong port (2465) or mismatched secure setting
  • Missing mail.from Warning: Caused Ghost to fall back to random sender, which Resend rejected
  • 404 on .mjs.map Files: Harmless static asset 404s in the Ghost admin UI

apt update && apt install swaks -y

๐Ÿ’ก Use swaks to test SMTP manually:

apt update && apt install swaks -y then

swaks --to your@email.com \
  --from "noreply@jameskaranja.me" \
  --server smtp.resend.com \
  --port 2587 \
  --auth LOGIN \
  --auth-user resend \
  --auth-password 'your-resend-api-key' \
  --tls \
  --header "Subject: Test from Resend" \
  --body "It works!"

๐ŸŽ‰ You're Done!

You've successfully configured Ghost to send email using Resend. Now your login links, staff invites, and member emails will go out reliably from your branded domain.


๐Ÿ“ˆ Bonus SEO Tips

  • Add SPF, DKIM, and DMARC records to boost deliverability
  • Use a recognizable from address like noreply@yourdomain.com
  • Enable open/click tracking via CNAME in Resend
  • Write clean, branded HTML emails for members using Ghost's Email Design settings

๐Ÿงต Final Thoughts

Resend makes Ghost email configuration super smooth โ€” if you know how to set it up right. Now you do! Use this guide as your reference and avoid the trial-and-error we went through. ๐Ÿ˜Ž

Let us know if you want to automate this via scripts, or integrate Resend with other apps like Django, Node, or Laravel.

Happy blogging!

Read more