Skip to main content

Overview

Resend is the recommended email provider for ShipFree in production. It’s a modern email API built for developers with:
  • Simple, intuitive API
  • Built-in React Email support
  • Excellent deliverability rates
  • Generous free tier (3,000 emails/month)
  • Native batch email support
  • Comprehensive analytics and logging
Resend is the first provider ShipFree checks for during auto-discovery. If you have RESEND_API_KEY set, it will be used automatically.

Prerequisites

  1. A Resend account
  2. A verified domain (or use Resend’s test domain for development)

Setup Instructions

Step 1: Get Your API Key

  1. Sign up or log in at resend.com
  2. Navigate to API Keys in the dashboard
  3. Click Create API Key
  4. Give it a name (e.g., “ShipFree Production”)
  5. Copy the API key (it starts with re_)
Save your API key immediately - Resend only shows it once for security.

Step 2: Verify Your Domain (Production)

For production use, you need to verify a domain:
  1. Go to Domains in the Resend dashboard
  2. Click Add Domain
  3. Enter your domain (e.g., yourdomain.com)
  4. Add the provided DNS records to your domain registrar:
    • SPF record
    • DKIM record
    • DMARC record (optional but recommended)
  5. Wait for DNS propagation (usually 5-15 minutes)
  6. Click Verify in Resend dashboard
Use a subdomain like mail.yourdomain.com to keep email DNS records separate from your main domain.

Step 3: Configure Environment Variables

Add these variables to your .env file:

Step 4: Test Your Configuration

Send a test email:

Features

Batch Email Support

Resend has native batch sending support, which ShipFree automatically uses:
Resend’s batch API can send up to 100 emails in a single request, significantly improving performance.

Attachments

Resend supports file attachments:

Custom Headers

ShipFree automatically handles unsubscribe headers for marketing emails:
This automatically adds RFC-compliant List-Unsubscribe headers.

Reply-To Address

Environment Variables Reference

Development vs. Production

Development Setup

For development, you can use Resend’s test domain:
Emails sent from onboarding@resend.dev only deliver to the email address associated with your Resend account. This is perfect for testing but won’t work in production.

Production Setup

Pricing

Resend offers:
  • Free Tier: 3,000 emails/month, 100 emails/day
  • Paid Plans: Starting at $20/month for 50,000 emails
  • Pay-as-you-go: $1 per 1,000 emails after quota
View current pricing →

Troubleshooting

This means RESEND_API_KEY is not set or is empty.Solution:
  1. Check your .env file has RESEND_API_KEY=re_...
  2. Restart your development server
  3. Verify the API key is valid in Resend dashboard
You’re trying to send from an unverified domain.Solution:
  • For development: Use onboarding@resend.dev
  • For production: Verify your domain in Resend dashboard
  • Check DEFAULT_FROM_EMAIL matches your verified domain
Check these common issues:
  1. Spam folder: Check recipient’s spam/junk folder
  2. Domain verification: Ensure all DNS records are set correctly
  3. API key: Verify it’s a production key, not test key
  4. Rate limits: Check you haven’t exceeded daily/monthly quota
  5. Resend logs: Check the Resend dashboard for delivery status
View all sent emails in the Resend dashboard:
  1. Log in to resend.com
  2. Go to Emails section
  3. View delivery status, opens, clicks, and more
Each email has a unique ID returned in result.data that you can search for.

Code Reference

The Resend provider implementation is in:
Key functions:
  • createResendProvider() - Initialize provider (line 114)
  • send() - Send single email (line 27)
  • sendBatch() - Send batch emails (line 63)

Additional Resources

Resend Documentation

Official Resend API documentation

Resend Dashboard

View sent emails and analytics

React Email

Learn more about React Email templates

Domain Setup

Guide to verifying your domain

Next Steps

1

Create custom email templates

Learn how to build custom templates in the Email Overview
2

Test in development

Use the log provider or Resend test domain to test email flows
3

Monitor delivery

Set up Resend webhooks to track email events (opens, clicks, bounces)