Before you start: Set up user authentication so your project has an auth database. Auth email templates only apply once auth is enabled.
Where to Find Templates
In your project, go to Database > Auth > Templates tab. You’ll see six templates you can customize, each with its own subject line, HTML body, and plain-text fallback.| Template | When it’s sent |
|---|---|
| Confirmation | After signup, to verify the user’s email address |
| Invite | When you invite someone to your team or app |
| Recovery | When a user requests a password reset |
| Magic Link | For passwordless login |
| Email Change | When a user updates their email, to confirm the new address |
| Reauthentication | Before a sensitive action, to re-verify identity |
Edit a Template
Update the subject line
The subject is what users see in their inbox list. Keep it short and specific — “Confirm your email for Acme” beats “Email confirmation”.
Edit the HTML body
Write or paste HTML with inline CSS. External stylesheets won’t load in most email clients. Use Supabase template variables to insert dynamic values (see below).
Add a plain-text version
Recommended. Some email clients default to plain text, and spam filters like it when both are present. Include the same action link in plain form.
Preview
Click Preview to see the rendered HTML with example data. Fix any layout issues before saving.
Template Variables
Supabase uses Go-style template syntax. The most common variables:| Variable | What it returns |
|---|---|
{{ .ConfirmationURL }} | The action link (confirm, reset, magic link) |
{{ .Token }} | The OTP code for manual entry |
{{ .Email }} | The recipient’s email address |
{{ .SiteURL }} | Your configured site URL |
{{ .RedirectTo }} | The post-action redirect URL, if set |
Example: Branded Confirmation Email
SMTP Is Required
Auth emails only send once SMTP is configured. You have two options on the SMTP tab of the same Auth page:- Hiveku Email — use your project’s built-in email service (easiest, no setup)
- Custom SMTP — bring your own provider (SendGrid, Postmark, your own SMTP server)
Verify Your Changes
Troubleshooting
Template saved but no email arrives
Template saved but no email arrives
SMTP isn’t configured yet. Go to the SMTP tab and either enable Hiveku Email or add your provider’s credentials. Without SMTP, auth emails are queued but never sent.
Variables showing as literal `{{ .Variable }}` text
Variables showing as literal `{{ .Variable }}` text
Use exact Go template syntax —
{{ .ConfirmationURL }} with a leading dot and spaces around the variable. A missing dot or a typo in the variable name means it’s rendered as literal text.Emails landing in spam
Emails landing in spam
Your sending domain isn’t verified. See Email domains to add SPF, DKIM, and DMARC records. Unverified domains get filtered aggressively.
HTML looks broken in Gmail or Outlook
HTML looks broken in Gmail or Outlook
Email clients strip external CSS. Use only inline styles. Avoid flexbox and grid — use tables for layout. Test with the Preview button and with real test emails across clients.
Links in the email go to localhost
Links in the email go to localhost
Your Site URL is still pointing at a dev address. Update Site URL under Database > Auth > URL Configuration to your production domain.
What’s Next?
Set Up User Authentication
Enable signup, login, and password reset flows
Email Domains
Verify your sending domain so emails land in the inbox