reference

Email Deliverability Guide - Avoiding Spam Folders

This guide helps ensure your password reset emails (and other transactional emails) reach users' inboxes instead of spam folders.

1. Domain Authentication (Critical)

The most important step is to set up proper domain authentication records (SPF, DKIM, DMARC) in your DNS.

SPF (Sender Policy Framework)

SPF tells email servers which servers are authorized to send emails from your domain.

Add to your DNS (TXT record):

For Resend:

v=spf1 include:_spf.resend.com ~all

Or if you're using multiple email services:

v=spf1 include:_spf.resend.com include:_spf.google.com ~all

DKIM (DomainKeys Identified Mail)

DKIM adds a digital signature to emails to prove they came from your domain.

Resend automatically provides DKIM records:

  1. Go to Resend Dashboard → Domains
  2. Select your verified domain
  3. Copy the DKIM records (usually 3 CNAME records)
  4. Add them to your DNS

Example DKIM records from Resend:

resend._domainkey.yourdomain.com → CNAME → [resend-provided-value]

DMARC (Domain-based Message Authentication)

DMARC tells email servers what to do with emails that fail SPF or DKIM checks.

Add to your DNS (TXT record):

Start with a relaxed policy:

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

After monitoring for a few weeks, tighten it:

v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com

Eventually, enforce strict policy:

v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com

Verify DNS Records

Use these tools to verify your DNS records are correct:

2. Email Content Best Practices

Subject Line

Good:

  • "Reset your HiveJournal password"
  • "Password reset request for HiveJournal"
  • "HiveJournal: Reset your password"

Bad:

  • "URGENT: Reset Password NOW!!!"
  • "Click here to reset"
  • "Free password reset"

Email Body

Do:

  • Use clear, professional language
  • Include your brand/company name
  • Explain why they're receiving the email
  • Include a clear call-to-action
  • Add an expiration time for the link
  • Include a "Didn't request this?" section
  • Use proper HTML structure
  • Include plain text version

Don't:

  • Use excessive capitalization
  • Use too many exclamation marks
  • Include suspicious links
  • Use URL shorteners
  • Include attachments
  • Use spam trigger words (free, urgent, click here, etc.)

Example Good Email Template

Subject: Reset your HiveJournal password

Hi there,

We received a request to reset the password for your HiveJournal account.

Click the link below to reset your password:

[Reset Password Button/Link]

This link will expire in 1 hour for security reasons.

If you didn't request this password reset, please ignore this email. 
Your password will remain unchanged.

If you have any questions, please contact us at support@hivejournal.com.

Thanks,
The HiveJournal Team

3. Sender Reputation

Use a Dedicated Subdomain

Consider using a subdomain for transactional emails:

  • Main domain: hivejournal.com
  • Email subdomain: mail.hivejournal.com or noreply.hivejournal.com

This protects your main domain's reputation.

Warm Up Your Domain

If using a new domain or subdomain:

  1. Start with low volume
  2. Gradually increase email volume
  3. Monitor bounce rates and spam complaints
  4. Maintain high engagement (opens, clicks)

Monitor Your Reputation

Check your domain reputation:

4. Resend-Specific Recommendations

Verify Your Domain in Resend

  1. Go to Resend Dashboard → Domains
  2. Add your domain
  3. Add all required DNS records (SPF, DKIM, DMARC)
  4. Wait for verification (usually a few minutes to hours)
  5. Use verified domain for sender email

Use Verified Sender Email

Always use an email address from your verified domain:

  • noreply@hivejournal.com
  • no-reply@hivejournal.com
  • support@hivejournal.com
  • noreply@gmail.com (unverified domain)

Monitor Resend Dashboard

  1. Check Emails section for delivery status
  2. Monitor bounce rates
  3. Check spam complaints
  4. Review delivery analytics

5. Technical Best Practices

Email Headers

Ensure proper email headers:

  • From: Use verified domain email
  • Reply-To: Set to a monitored email address
  • List-Unsubscribe: Not needed for transactional emails
  • X-Mailer: Can identify your application

HTML Email Structure

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
  <!-- Content here -->
</body>
</html>

Include Plain Text Version

Always include a plain text version alongside HTML for better deliverability.

6. Supabase Email Template Customization

Customize the Reset Password Template

  1. Go to Supabase DashboardAuthenticationEmail Templates
  2. Select Reset Password template
  3. Customize with best practices:
Subject: Reset your HiveJournal password

Hi there,

We received a request to reset the password for your HiveJournal account.

Click the link below to reset your password:

{{ .ConfirmationURL }}

This link will expire in 1 hour for security reasons.

If you didn't request this password reset, please ignore this email. 
Your password will remain unchanged.

If you have any questions, please contact us at support@hivejournal.com.

Thanks,
The HiveJournal Team

---
HiveJournal - Your personal journaling companion

7. Testing Deliverability

Use Mail-Tester

  1. Go to Mail-Tester.com
  2. Get a test email address
  3. Send a password reset email to that address
  4. Check your score (aim for 10/10)
  5. Fix any issues reported

Test with Real Email Providers

Send test emails to:

  • Gmail
  • Outlook/Hotmail
  • Yahoo
  • Apple Mail
  • Check spam folders

Monitor Over Time

  • Track spam complaint rates (should be < 0.1%)
  • Monitor bounce rates (should be < 5%)
  • Track open rates (transactional emails typically 20-40%)
  • Monitor click rates

8. Quick Checklist

Before sending production emails:

  • Domain verified in Resend
  • SPF record added to DNS
  • DKIM records added to DNS
  • DMARC record added to DNS
  • DNS records verified with tools
  • Email template follows best practices
  • Sender email from verified domain
  • Tested with Mail-Tester (score 8+/10)
  • Tested with real email providers
  • Monitored in Resend dashboard
  • Set up Google Postmaster Tools
  • Domain reputation checked

9. If Emails Still Go to Spam

Immediate Actions

  1. Check DNS records: Verify SPF, DKIM, DMARC are correct
  2. Check Resend dashboard: Look for delivery issues
  3. Test with Mail-Tester: Identify specific problems
  4. Review email content: Remove any spam triggers
  5. Check sender reputation: Use reputation checkers

Long-term Solutions

  1. Warm up domain: Gradually increase email volume
  2. Maintain engagement: High open/click rates improve reputation
  3. Monitor complaints: Keep spam complaints < 0.1%
  4. Use subdomain: Consider dedicated email subdomain
  5. Build reputation: Consistent sending over time

10. Additional Resources

EMAIL DELIVERABILITY — Docs | HiveJournal