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.

POST/v1/send
200 OK
To
ana@acme.com
From
Acme <hello@acme.com>
Subject
Reset your password

Reset your password

To ana@acme.com

  1. Sent09:41:02
  2. Delivered09:41:03
  3. Opened09:42:18

Before you send

  1. Create a project

    Sign up for free and copy your secret key from the project settings.

  2. Verify your domain

    Add the DNS records Plunk shows you. It checks them and tells you when you can send.

  3. 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.

Supabase Auth SMTP settings
Host:          smtp.useplunk.com
Port:          587
Username:      plunk
Password:      your Plunk secret key
Sender email:  hello@acme.com
Sender name:   Acme

Send with the API

Send from an Edge Function with fetch. Store the key with supabase secrets set PLUNK_SECRET_KEY=...

supabase/functions/welcome/index.ts
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.