Email Setup with Resend
Configure Resend to send team invitation emails and notifications from your WhatsApp Team Inbox.TL;DR - Quick Setup
1
Sign up for Resend
resend.com → Create account (free tier: 100 emails/day)
2
Get API Key
Dashboard → API Keys → Create API Key → Copy key
3
Add to .env
4
Verify Domain (Optional)
For production: Add DNS records to send from your domain
Overview
Resend is a modern email API designed for developers. It’s the email service used by WhatsApp Team Inbox for sending team invitation emails.
What Resend is Used For
Team Invitations
Send invitation emails when adding new team members
Password Resets
Send password reset links (future feature)
Notifications
Optional email notifications for new messages
System Alerts
Critical system notifications to admins
Email setup is optional. If not configured, invitation links will be displayed in the admin panel for manual sharing.
Why Resend?
Simple API
Clean REST API, no complicated SMTP configuration
Generous Free Tier
100 emails/day free forever
Built for Developers
Modern developer experience, great documentation
Reliable Delivery
High deliverability rates out of the box
Prerequisites
A Resend account (free tier available)
A domain name (optional, for production use)
Access to your domain’s DNS settings (for production)
Step 1: Create Resend Account
1
Sign Up
Go to resend.com and create a free account.No credit card required for the free tier.
2
Verify Email
Check your email and click the verification link.
3
Complete Onboarding
Follow the onboarding prompts to set up your account.
Step 2: Get API Key
1
Navigate to API Keys
In Resend dashboard, go to API Keys section.
2
Create New API Key
- Click Create API Key
- Name: “WhatsApp Team Inbox”
- Permission: Full Access (or Sending access for production)
- Click Add
3
Copy API Key
Copy the API key immediately - you won’t be able to see it again!
Step 3: Configure Environment Variables
Add these variables to your.env file:
Required Variables
Your Resend API keyExample:
re_123abc456def789ghi012jkl345mno678Get from: Resend Dashboard → API KeysOptional Variables
Email address to send fromDevelopment: Use default
onboarding@resend.devProduction: Use your verified domain noreply@yourdomain.comDisplay name for senderExample:
WhatsApp Team Inbox or Your Company NameYour application URL (used for invitation links)Development:
http://localhost:3000Production: https://app.yourdomain.comExample Configuration
- Development
- Production
In development, you can use Resend’s default
onboarding@resend.dev sender without domain verification.Step 4: Verify Domain (Production Only)
For production deployments, verify your domain to send emails from your own domain.1
Add Domain to Resend
- In Resend dashboard, go to Domains
- Click Add Domain
- Enter your domain:
yourdomain.com - Click Add
2
Add DNS Records
Resend will provide DNS records to add to your domain:Add these records in your domain registrar’s DNS settings:
- Namecheap
- GoDaddy
- Cloudflare
- Google Domains
- etc.
3
Verify Domain
- Wait for DNS propagation (5 minutes - 48 hours)
- Click Verify in Resend dashboard
- Once verified, you can send from
@yourdomain.com
4
Update Environment Variable
Update your
FROM_EMAIL to use verified domain:Step 5: Test Email Sending
Verify your email configuration is working:1
Restart Application
Restart your backend server to load new environment variables:
2
Check Logs
Look for email service initialization message:If you see a warning:Then
RESEND_API_KEY is not set correctly.3
Send Test Invitation
Invite a team member from the admin panel:
- Go to Settings → Team
- Click Invite Member
- Enter email address
- Select role
- Click Send Invitation
4
Check Email Delivery
- Check the recipient’s inbox
- Email should arrive within seconds
- Subject: “You’ve been invited to join [Your App Name] as [Role]”
- Click invitation link to verify it works
Email Templates
The invitation email includes:Professional Design
Clean, responsive HTML email template
Clear CTA
Prominent “Accept Invitation” button
Plain Text Fallback
Works in all email clients
Expiry Notice
7-day expiration mentioned in email
Customizing Email Templates
To customize email templates, edit:- Inviter name
- Role assignment
- Invitation link
- Expiration period
- Company branding
Pricing & Limits
Free Tier
Resend Free Tier
Perfect for small teams
- 100 emails per day
- 3,000 emails per month
- Full API access
- 1 verified domain
- No credit card required
- Teams up to 10 people
- Light notification usage
Paid Plans
| Plan | Monthly Cost | Emails Included | Best For |
|---|---|---|---|
| Free | $0 | 3,000/month | Small teams |
| Pro | $20 | 50,000/month | Growing teams |
| Scale | Custom | Custom | Large teams |
Most teams stay on the free tier. You only need paid plans if sending >100 invitations per day or using advanced features.
Deliverability Best Practices
Verify Domain
Use verified domain for better deliverability
Monitor Bounces
Check Resend dashboard for bounce rates
Avoid Spam Triggers
Don’t send unsolicited emails
Use Real Reply-To
Set up monitored reply-to address
Domain Verification Benefits
Higher Deliverability
Higher Deliverability
Verified domains have better inbox placement rates:
- Unverified: ~85-90% inbox rate
- Verified: ~95-99% inbox rate
Custom Email Addresses
Custom Email Addresses
Use your brand’s email addresses:
team@yourcompany.comnoreply@yourcompany.cominvites@yourcompany.com
DKIM Signatures
DKIM Signatures
Automatic email authentication:
- Prevents email spoofing
- Increases trust with email providers
- Required by some enterprise recipients
Troubleshooting
Emails not sending
Emails not sending
Check these:
- Verify
RESEND_API_KEYis set correctly - Check backend logs for errors
- Verify API key has “Sending access” permission
- Check Resend dashboard for failed sends
- Ensure
NEXT_PUBLIC_APP_URLis correct
Emails going to spam
Emails going to spam
Common causes:
- Domain not verified
- Sending from
onboarding@resend.devin production - No DKIM/SPF records
- Verify your domain in Resend
- Add all DNS records (DKIM, SPF)
- Use custom domain email address
- Avoid spam trigger words in content
Domain verification failing
Domain verification failing
Steps to fix:
- Wait 24-48 hours for DNS propagation
- Check DNS records are added correctly:
- Verify no typos in DNS values
- Check you’re adding records to the right domain
- Contact Resend support if still failing
API key invalid error
API key invalid error
Solutions:
- Verify key starts with
re_ - Check for spaces or line breaks when copying
- Regenerate API key in Resend dashboard
- Ensure environment variable is loaded:
- Restart backend after updating .env
Monitoring Email Delivery
Resend Dashboard
Track email performance in Resend dashboard:- Go to Emails in Resend dashboard
-
View recent sends with status:
- ✅ Delivered
- ⏳ Queued
- ❌ Failed
- ⚠️ Bounced
-
Click on any email to see:
- Delivery time
- Recipient
- Subject
- Content
- Error details (if failed)
Application Logs
Monitor in your backend logs:Alternative: Running Without Email
If you don’t want to set up email, you can still invite team members:1
Generate Invitation Link
When inviting a member, the invitation link will be displayed in the UI even if email fails.
2
Share Link Manually
Copy the invitation link and share via:
- Slack/Teams
- Text message
- Any other communication channel
3
Team Member Accepts
They click the link and complete registration.
Security Considerations
Protect API Key
Never expose in client-side code or version control
Use Environment Variables
Store in .env files, not hardcoded
Rotate Keys
Regenerate API keys periodically
Monitor Usage
Watch for unusual sending patterns
API Key Best Practices
Production Checklist
Resend account created
API key generated and secured
Environment variables configured
Domain verified (for production)
DNS records added and verified
Test email sent successfully
Invitation emails working
Emails arriving in inbox (not spam)
FROM_EMAIL uses verified domain
Monitoring configured in Resend dashboard
Next Steps
Environment Variables
Complete all configuration settings
Team Management
Learn how to invite and manage team members
Going Live
Final checklist before launching
Troubleshooting
Common issues and solutions