Send email
with Supabase
Use Plunk as Supabase Auth’s SMTP server for sign-up and magic link emails, and call the API from Edge Functions for everything else.
- To
- ana@acme.com
- From
- Acme <hello@acme.com>
- Subject
- Reset your password
Reset your password
To ana@acme.com
- Sent09:41:02
- Delivered09:41:03
- Opened09:42:18
Before you send
Create a project
Sign up for free and copy your secret key from the project settings.
Verify your domain
Add the DNS records Plunk shows you. It checks them and tells you when you can send.
Send
Use the API or your framework’s mailer, below. Every email shows up in the dashboard.
Send with Supabase over SMTP
In the Supabase dashboard, open Authentication, then the SMTP settings, enable custom SMTP and enter these values.
Host: smtp.useplunk.com
Port: 587
Username: plunk
Password: your Plunk secret key
Sender email: hello@acme.com
Sender name: AcmeSend with the API
Send from an Edge Function with fetch. Store the key with supabase secrets set PLUNK_SECRET_KEY=...
Deno.serve(async request => {
const {email} = await request.json();
const response = await fetch('https://send-api.akmarketingseo.com/v1/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${Deno.env.get('PLUNK_SECRET_KEY')}`,
},
body: JSON.stringify({
to: email,
subject: 'Welcome to Acme',
body: '<p>Thanks for signing up.</p>',
}),
});
return new Response(null, {status: response.ok ? 204 : 502});
});Frequently asked questions
Send your first email from Supabase.
Start on the free plan with 1,000 emails a month, no credit card needed. When you need more, every email is $0.001, with unlimited contacts and every feature included.