Send transactional emails from Supabase Edge Functions. Perfect for authentication flows, notifications, and more.
Everything you need to send emails from Supabase
Edge Functions integration
Database triggers support
Auth email customization
Webhook integration
Real-time notifications
Get up and running in minutes with this code example
// supabase/functions/send-email/index.ts
import { serve } from 'https://deno.land/std@0.177.0/http/server.ts';
import { Unosend } from 'npm:@unosend/node';
const unosend = new Unosend(Deno.env.get('UNOSEND_API_KEY')!);
serve(async (req) => {
const { to, subject, html } = await req.json();
const { data, error } = await unosend.emails.send({
from: 'hello@yourdomain.com',
to,
subject,
html,
});
if (error) {
return new Response(JSON.stringify({ error }), {
status: 400,
headers: { 'Content-Type': 'application/json' },
});
}
return new Response(JSON.stringify({ data }), {
headers: { 'Content-Type': 'application/json' },
});
});Follow these steps to integrate Unosend with Supabase
Create a Supabase Edge Function
Add UNOSEND_API_KEY to your Supabase secrets
Import the Unosend SDK using npm: prefix
Deploy the function with supabase functions deploy
Call the function from your app or database triggers
Serverless email sending
Trigger emails from database events
Customize auth emails
Global edge deployment
More platform integrations you might like
Start sending emails from Supabase in under 5 minutes. Free tier includes 5,000 emails/month.