When you create a new Supabase project, it comes with a built-in email server for handling auth emails (like magic links, password resets, and email confirmations). However, this built-in server is heavily rate-limited (typically to a few emails per hour) and should only be used for testing.
For production, you need a custom SMTP provider. [Resend](https://resend.com/) is currently one of the best choices for developers—it's fast, has a great developer experience, and boasts excellent deliverability.
Here is how you can connect Resend to your Supabase project using SMTP.
Step 1: Set Up Your Resend Account
1. Go to [Resend.com](https://resend.com/) and create an account. 2. Navigate to the Domains section in the Resend dashboard. 3. Click Add Domain and follow the instructions to verify your domain by adding the provided DNS records (TXT and MX) to your domain registrar (like GoDaddy, Vercel, or Cloudflare). 4. *Note: Verification can take anywhere from a few minutes to a few hours depending on your DNS provider.*
Step 2: Generate a Resend API Key
Once your domain is verified: 1. Go to the API Keys section in your Resend dashboard. 2. Click Create API Key. 3. Give it a descriptive name (e.g., `Supabase Auth SMTP`). 4. Select Sending access (you only need the permission to send emails). 5. Copy the generated API key. Keep this safe, as you won't be able to see it again!
Step 3: Configure Supabase SMTP Settings
Now, head over to your Supabase project dashboard.
1. Navigate to Authentication → Providers → Email. 2. Scroll down to the Custom SMTP section and toggle "Enable Custom SMTP" to ON. 3. Fill in the credentials using Resend's SMTP details:
| Field | What to enter | | :--- | :--- | | Sender email | An email address at your verified domain (e.g., `noreply@yourdomain.com`) | | Sender name | Your app or company name (e.g., `My Awesome App`) | | Host | `smtp.resend.com` | | Port | `465` | | User | `resend` | | Password | *Paste your Resend API Key here* |
4. Click Save at the bottom of the page.
Step 4: Test Your Configuration
Before calling it a day, it is crucial to test the connection.
1. While still in the Supabase Authentication settings, scroll up to the Auth Providers list. 2. Under the Email provider, you will often see an option to send a test email. 3. Alternatively, simply try to sign up a test user on your live application. 4. Check your inbox to ensure the email arrived and didn't bounce.
By routing your Supabase auth emails through Resend via SMTP, you bypass the default rate limits and ensure your users consistently receive their magic links and password reset emails instantly.