Prerequisites
Before you start, you’ll need:- A Resend API key
- A verified domain
Guide
1
Create Supabase function
Create a new function locally:
2
Edit the handler function
Paste the following code into the
index.ts file:index.ts
3
Deploy and send email
Run function locally:Deploy function to Supabase:Open the endpoint URL to send an email:

Examples
Supabase Edge Functions Example
See the full source code.