Skip to Content

Email Setup (SMTP)

Supabase needs an SMTP server to send magic link emails. By default, Supabase uses a built-in email service with rate limits. For production, configure your own SMTP.

Free/Development Testing

Supabase’s built-in email works for testing with limits:

  • 4 emails per hour
  • Emails may land in spam

Good for development, but configure custom SMTP for production.

SMTP Providers

Resend  offers 3,000 free emails/month and is very easy to set up.

Setup:

  1. Create account at resend.com 
  2. Add and verify your domain
  3. Create an API key
  4. In Supabase, go to Project Settings → Auth → SMTP Settings
  5. Add your Resend SMTP settings 

Option 2: MXRoute

MXRoute  is affordable email hosting ($49/year). Add your domain, create a mailbox, and use your MXRoute SMTP credentials in Supabase.

Configure in Supabase

  1. Go to Project Settings → Auth
  2. Scroll to SMTP Settings
  3. Toggle “Enable Custom SMTP”
  4. Enter your provider’s settings
  5. Click Save

Customize Email Template (Optional)

  1. Go to Authentication → Email Templates
  2. Select “Magic Link”
  3. Edit the subject and body

Example template:

<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 400px; margin: 0 auto; padding: 40px 20px;"> <h2 style="color: #1a1a1a; font-size: 24px; font-weight: 600; margin-bottom: 16px;">Sign in to your account</h2> <p style="color: #666; font-size: 16px; line-height: 1.5; margin-bottom: 24px;">Click the button below to securely sign in. This link expires in 24 hours.</p> <a href="{{ .ConfirmationURL }}" style="display: inline-block; background-color: #000; color: #fff; font-size: 16px; font-weight: 500; padding: 12px 32px; border-radius: 8px; text-decoration: none;">Sign In</a> <p style="color: #999; font-size: 14px; margin-top: 32px;">If you didn't request this email, you can safely ignore it.</p> </div>

Test Your Setup

  1. Open your app
  2. Go to auth screen → Enter your email
  3. Check your inbox (and spam folder)
  4. Click the magic link
  5. You should be logged into the app

Troubleshooting

Emails not arriving?

  • Check spam folder
  • Verify SMTP credentials
  • Check Supabase logs: Logs → Auth
  • Ensure sender domain is verified with your provider

Emails going to spam?

  • Set up SPF, DKIM, and DMARC records for your domain
  • Avoid spam-trigger words in subject

Rate limited?

  • Default Supabase limit is 4 emails/hour
  • Configure custom SMTP to remove limits