Configuring Resend for Email Delivery
Resend is a powerful email API that allows you to send transactional emails with ease. This guide will walk you through the process of configuring Resend for your production environment, including setting up a custom SMTP server via their integrations.
Prerequisites
- A Resend account.
- Access to your domain's DNS settings.
Steps to Configure Resend
1. Verify Your Domain
- Log in to your Resend dashboard.
- Navigate to "Domains" and click "Add Domain".
- Enter your domain name and follow the instructions to add the necessary DNS records.
- Wait for DNS propagation and domain verification (this may take up to 48 hours).
2. Set Up Custom SMTP Server
- In the Resend dashboard click API Keys.
- Create a new API Key.
- Note down the API Key - this is your SMTP password.
- Now go to settings and click "SMTP".
- Note down the SMTP settings provided:
- SMTP Host:
smtp.resend.com
- Port:
465
- Username:
resend
- Password: Your API Key
- SMTP Host:
3. Update Supabase SMTP Settings
- Log in to your Supabase dashboard.
- Navigate to "Project Settings" > "Auth" > "SMTP Settings".
- Enable custom SMTP server and enter the Resend SMTP details:
- Sender Email:
noreply@yourdomain.com
(use your verified domain) - Sender Name: Your application name
- Host:
smtp.resend.com
- Port:
465
- User:
resend
- Password: Your Resend SMTP password (API Key)
- Sender Email:
4. Update Your Environment Variables
Update your apps/web/.env.local
file with the Resend API key: