Home / Email for Supabase

For Supabase

Email for Supabase apps

Supabase gives you the database and auth; it doesn't give you a mailbox. Mektup fills that gap two ways: call the REST API from an Edge Function to send transactional mail, or point Supabase Auth's own custom SMTP settings straight at a Mektup mailbox so the emails Supabase already sends - confirmations, magic links, password resets - come from your domain instead of a shared default sender.

Two ways to use Mektup with Supabase

Most Supabase apps need email for two different things: your own transactional sends (welcome emails, receipts, notifications you trigger from a Database Webhook or Edge Function), and Supabase Auth's built-in emails (sign-up confirmation, magic link, password reset). Mektup covers both - the first through its REST API, the second by acting as a drop-in SMTP provider for Supabase Auth itself.

Sending from an Edge Function

// supabase/functions/send-welcome-email/index.ts
Deno.serve(async (req) => {
  const { to, name } = await req.json();

  const res = await fetch("https://api.usemektup.com/v1/emails", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${Deno.env.get("MEKTUP_API_KEY")}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from: "hello@yourapp.com",
      to,
      subject: `Welcome, ${name}`,
      html: `<p>Welcome, ${name}!</p>`,
    }),
  });

  return new Response(await res.text(), { status: res.status });
});

Deno's built-in fetch() is all this needs - no package to add to the function's imports. Set the key once with supabase secrets set MEKTUP_API_KEY=mek_live_... and every function in the project can read it from Deno.env.

Replacing Supabase Auth's default email sender

Supabase Auth ships with a shared, rate-limited default email sender meant for testing, not production - the standard fix is Project Settings → Auth → SMTP Settings, pointing it at any real SMTP provider. A Mektup mailbox works there directly, because mailbox creation returns real SMTP-AUTH credentials, not just API-key access:

  • Host: mail.usemektup.com
  • Port: 587 (or 465)
  • Username: the full mailbox address, e.g. hello@yourapp.com
  • Password: the mailbox's password
  • Sender email: the same mailbox address

Once that's set, sign-up confirmations, magic links, and password resets send from your own domain through your own mailbox - and because it's a real mailbox, you can also open it in webmail or IMAP to see exactly what went out.

Setting up the domain

1. Register your domain

Add the domain your app uses to Mektup and get back the MX, SPF, DKIM, and DMARC records. This is separate from your Supabase project's own settings - Mektup never touches your project URL or database.

2. Add the DNS records

Paste them wherever the domain's DNS lives. Only MX and TXT records change, so anything else on that domain - a frontend on Vercel, a marketing site elsewhere - keeps working untouched.

3. Create a mailbox

Create hello@yourapp.com. It's immediately usable both ways: as an API-key-authenticated sender for your own Edge Functions, and as SMTP credentials for Supabase Auth.

What it costs

Getting started is free - 1 domain, 3,000 emails a month with no daily cap, and 3GB of storage, no credit card. See the full pricing.

Get started free

FAQ

Common questions

Can I use Mektup for Supabase Auth emails (magic links, confirmations, password resets)?

Yes. Every Mektup mailbox has real SMTP-AUTH credentials (mail.usemektup.com, port 465 or 587), the same kind Outlook or Apple Mail would use. Paste them into Supabase's Project Settings → Auth → SMTP Settings and Supabase's own auth emails send through your Mektup mailbox on your domain, instead of Supabase's shared default sender.

Do I need a Node or Deno SDK to send from a Supabase Edge Function?

No. Supabase Edge Functions run on Deno, which has the standard fetch() API built in - a single JSON POST to Mektup's REST API is all that's needed, no package to install or bundle.

Does this conflict with my Supabase project's own domain or database?

No. Mektup only manages MX/SPF/DKIM/DMARC records for whatever domain you register - it never touches your Supabase project URL, database, or any A/CNAME records your frontend uses.

Ready when you are

Real email alongside your Supabase database

Get started free