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
- A Resend account
- A verified domain (or use Resend’s test domain for development)
Setup Instructions
Step 1: Get Your API Key
- Sign up or log in at resend.com
- Navigate to API Keys in the dashboard
- Click Create API Key
- Give it a name (e.g., “ShipFree Production”)
- Copy the API key (it starts with
re_)
Step 2: Verify Your Domain (Production)
For production use, you need to verify a domain:- Go to Domains in the Resend dashboard
- Click Add Domain
- Enter your domain (e.g.,
yourdomain.com) - Add the provided DNS records to your domain registrar:
- SPF record
- DKIM record
- DMARC record (optional but recommended)
- Wait for DNS propagation (usually 5-15 minutes)
- Click Verify in Resend dashboard
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:List-Unsubscribe headers.
Reply-To Address
Environment Variables Reference
| Variable | Required | Description | Example |
|---|---|---|---|
RESEND_API_KEY | Yes | Your Resend API key | re_123abc... |
RESEND_DOMAIN | No | Verified sending domain | mail.yourdomain.com |
EMAIL_PROVIDER | No | Force Resend as provider | resend |
DEFAULT_FROM_EMAIL | No | Default sender email | noreply@yourdomain.com |
DEFAULT_FROM_NAME | No | Default sender name | Your App Name |
Development vs. Production
Development Setup
For development, you can use Resend’s test domain: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
Troubleshooting
Error: 'Resend not configured'
Error: 'Resend not configured'
This means
RESEND_API_KEY is not set or is empty.Solution:- Check your
.envfile hasRESEND_API_KEY=re_... - Restart your development server
- Verify the API key is valid in Resend dashboard
Error: 'Invalid from address'
Error: 'Invalid from address'
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_EMAILmatches your verified domain
Emails not being received
Emails not being received
Check these common issues:
- Spam folder: Check recipient’s spam/junk folder
- Domain verification: Ensure all DNS records are set correctly
- API key: Verify it’s a production key, not test key
- Rate limits: Check you haven’t exceeded daily/monthly quota
- Resend logs: Check the Resend dashboard for delivery status
How do I see sent emails?
How do I see sent emails?
View all sent emails in the Resend dashboard:
- Log in to resend.com
- Go to Emails section
- View delivery status, opens, clicks, and more
result.data that you can search for.Code Reference
The Resend provider implementation is in: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
Create custom email templates
Learn how to build custom templates in the Email Overview