Ship/Now

What is wired · 2 min

Email

Resend for your own mail, Resend over SMTP for Supabase's, and the free-tier limit that makes it look broken.

There are two paths and they are easy to confuse.

Your mail goes through the Resend API from src/lib/email.ts: receipts, welcome messages, anything your app decides to send.

Supabase's mail is the magic link and the confirmation. Supabase sends that, not you, so it has to be told to send it through Resend over SMTP.

Your mail

import { sendEmail } from "@/lib/email";

await sendEmail({
  to: user.email,
  subject: "You're in",
  html: "<p>Everything is ready.</p>",
});

Templates are plain functions that return { subject, html }. No template engine, no MJML build step. If you want a designer's HTML, paste it in.

Supabase's mail

Under Project settings, Authentication, SMTP:

Host      smtp.resend.com
Port      465
User      resend
Password  your Resend API key
Sender    the same address as EMAIL_FROM

Then rewrite the three templates as described in Authentication. The default templates will not sign anyone in.

Deliverability

Three DNS records decide whether your mail lands or goes to spam. Resend gives you all three when you add a domain:

RecordHostPurpose
TXTresend._domainkeyDKIM. Proves the message was not altered
MXsendWhere bounces go
TXTsendSPF. Says Amazon SES may send for you

They sit on a send subdomain, so they do not collide with existing email forwarding on your apex.

Swapping provider

src/lib/email.ts is about forty lines and exports one function. Postmark, SES and Loops all take the same shape. Change that file; nothing else imports the SDK.

Something wrong or missing on this page? Tell us.