Back to Browse

Send Emails in Edge Functions

21.1K views
Sep 14, 2023
17:51

​@resendlabs is the Email API for developers and allows us to send Emails from our custom domains both with Supabase Auth and in Edge Functions. Conveniently connect your Supabase account to Resend using their integration[0] to automatically send auth emails from your own domains. Additionally use their API in Edge Functions to automatically send emails based on Database Webhooks[1]. [0] https://supabase.com/partners/integrations/resend?utm_source=youtube&utm_medium=video&utm_term=resend&utm_content=Qf7XvL1fjvo [1] https://supabase.com/docs/guides/database/webhooks?utm_source=youtube&utm_medium=video&utm_term=resend&utm_content=Qf7XvL1fjvo - Find the code: https://github.com/thorwebdev/edgy-edge-functions/blob/main/supabase/functions/resend/index.ts?utm_source=youtube&utm_medium=video&utm_term=resend&utm_content=Qf7XvL1fjvo - Read the docs: https://resend.com/docs/send-with-supabase-edge-functions 🎙️ Presented by Thor Schaeff (@thorwebdev https://go.thor.bio/x) ## Chapters 00:00 Intro to Resend.com 00:17 Connect Supabase Auth to Resend 01:10 Configure a custom domain with Resend 01:59 Set up custom SMTO for Supabase Auth with Resend 03:15 Send an invitation email with Supabase Auth and Resend 04:34 Send Emails in Serverless Edge Functions 06:25 Generate TypeScript types for the auth schema 08:10 Handle Database Webhook payload 09:25 Make fetch request to Resend API to send email 12:33 Set up Resend API key and store as secret 14:21 Deploy the Supabase Edge Function 14:50 Configure Auth Database Webhook 15:40 Automatically send email when user is deleted 16:30 Automatically send email when new user signs up

Download

0 formats

No download links available.

Send Emails in Edge Functions | NatokHD