Before you start
- A verified sending domain for the sender address, such as
auth@mail.example.com. - An API key with send permission. It is both the SMTP password and the key the hook function uses.
Pick a method
Custom SMTP and the hook don’t run together: when the hook is on, Supabase sends every auth email through it and skips SMTP (Supabase Send Email Hook docs, read on November 14, 2026).
Custom SMTP
In the Supabase dashboard, open Authentication, Emails, SMTP Settings, turn on Enable custom SMTP, and fill in:
Port 587 uses STARTTLS, the only mode Nuntly’s relay accepts. The SMTP guide has the full relay settings.
Saving custom SMTP in the dashboard sets the project to 30 emails per hour (Supabase custom SMTP docs, read on November 14, 2026). Raise it under Authentication, Rate Limits before you launch. The Supabase email guide covers the Management API call, which needs
rate_limit_email_sent set as well.
Keep click tracking off on the domain that sends auth emails: Supabase recommends it because rewritten links can break its confirmation links (Supabase production checklist, read on November 14, 2026).
Send Email Hook
Supabase Auth calls an Edge Function for each auth email, and the function sends it with the Nuntly TypeScript SDK. In Authentication, Hooks, add a Send Email hook of type HTTPS and generate its secret. The function reads four secrets:
Set the first three with the Supabase CLI:
- Write the function in
supabase/functions/send-email/index.ts. The code, the mapping of eachemail_action_typeto an email, and the response rules Supabase Auth enforces are in the Send Email Hook section of the guide. - Deploy the function with
supabase functions deploy send-email --no-verify-jwt. Supabase Auth authenticates with the hook signature, not a user token. - In Authentication, Hooks, set the Send Email hook URL to
https://<project-ref>.supabase.co/functions/v1/send-emailand enable it.
Self-hosted Supabase
A self-hosted instance reads its SMTP settings from the.env file of the Docker setup (Supabase self-hosting with Docker, read on November 14, 2026). Use port 587, not the 465 of Supabase’s example:
Learn more
Supabase email guide
Custom SMTP, the Send Email Hook function, app emails and troubleshooting
Send emails with SMTP
Relay settings, ports and authentication
