> ## Documentation Index
> Fetch the complete documentation index at: https://nuntly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Supabase auth emails through Nuntly

> Settings to send Supabase Auth emails through Nuntly: custom SMTP fields, Send Email Hook secrets, and the environment variables of a self-hosted instance.

Supabase Auth sends sign-up confirmations, magic links, invitations, password resets and email change confirmations. This page lists the values to send them through Nuntly. For the step by step, the full Edge Function and app emails, read the [Supabase email guide](https://nuntly.com/blog/send-supabase-emails).

## Before you start

* A [verified sending domain](https://nuntly.com/docs/guides/sending-domains.md) for the sender address, such as `auth@mail.example.com`.
* An [API key](https://nuntly.com/docs/guides/api-keys.md) with send permission. It is both the SMTP password and the key the hook function uses.

## Pick a method

| Method | Who writes the email | Where you set it |
| - | - | - |
| Custom SMTP | Supabase templates | Supabase dashboard |
| Send Email Hook | Your Edge Function | Supabase dashboard and an Edge Function |
| Self-hosted SMTP | Supabase templates | The `.env` file of your instance |

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](https://supabase.com/docs/guides/auth/auth-hooks/send-email-hook), read on November 14, 2026).

## Custom SMTP

In the Supabase dashboard, open **Authentication**, **Emails**, **SMTP Settings**, turn on **Enable custom SMTP**, and fill in:

| Field | Value |
| - | - |
| Sender email address | An address on your verified domain |
| Sender name | Your app name |
| Host | `smtp.nuntly.com` |
| Port number | `587` |
| Username | `nuntly` |
| Password | Your Nuntly API key (starts with `ntly_`) |

Port 587 uses STARTTLS, the only mode Nuntly's relay accepts. The [SMTP guide](https://nuntly.com/docs/guides/send-emails-with-smtp.md) has the full relay settings.

Saving custom SMTP in the dashboard sets the project to 30 emails per hour ([Supabase custom SMTP docs](https://supabase.com/docs/guides/auth/auth-smtp), read on November 14, 2026). Raise it under **Authentication**, **Rate Limits** before you launch. The [Supabase email guide](https://nuntly.com/blog/send-supabase-emails#set-up-custom-smtp-in-supabase) 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](https://supabase.com/docs/guides/deployment/going-into-prod), 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](https://nuntly.com/docs/api-reference/typescript-sdk.md). In **Authentication**, **Hooks**, add a **Send Email** hook of type **HTTPS** and generate its secret. The function reads four secrets:

| Secret | Value |
| - | - |
| `NUNTLY_API_KEY` | Your Nuntly API key |
| `SEND_EMAIL_HOOK_SECRET` | The hook secret (starts with `v1,whsec_`) |
| `EMAIL_FROM` | The sender, such as `Acme <auth@mail.example.com>` |
| `SUPABASE_URL` | Set by default on hosted projects |

Set the first three with the Supabase CLI:

```bash theme={null}
supabase secrets set \
  NUNTLY_API_KEY=ntly_... \
  SEND_EMAIL_HOOK_SECRET='v1,whsec_...' \
  EMAIL_FROM='Acme <auth@mail.example.com>'
```

Then:

1. Write the function in `supabase/functions/send-email/index.ts`. The code, the mapping of each `email_action_type` to an email, and the response rules Supabase Auth enforces are in the [Send Email Hook section](https://nuntly.com/blog/send-supabase-emails#send-auth-emails-with-the-send-email-hook) of the guide.
2. Deploy the function with `supabase functions deploy send-email --no-verify-jwt`. Supabase Auth authenticates with the hook signature, not a user token.
3. In **Authentication**, **Hooks**, set the Send Email hook URL to `https://<project-ref>.supabase.co/functions/v1/send-email` and enable it.

The hook keeps the project's email rate limit: raise it under **Authentication**, **Rate Limits** as with SMTP ([Supabase rate limits](https://supabase.com/docs/guides/auth/rate-limits), read on November 14, 2026).

## Self-hosted Supabase

A self-hosted instance reads its SMTP settings from the `.env` file of the Docker setup ([Supabase self-hosting with Docker](https://supabase.com/docs/guides/self-hosting/docker), read on November 14, 2026). Use port 587, not the 465 of Supabase's example:

```bash theme={null}
SMTP_ADMIN_EMAIL=auth@mail.example.com
SMTP_HOST=smtp.nuntly.com
SMTP_PORT=587
SMTP_USER=nuntly
SMTP_PASS=ntly_your_api_key
SMTP_SENDER_NAME=Acme
```

Restart the stack to apply them.

## Learn more

> [card] [Supabase email guide](https://nuntly.com/blog/send-supabase-emails)
>
> Custom SMTP, the Send Email Hook function, app emails and troubleshooting

> [card] [Send emails with SMTP](https://nuntly.com/docs/guides/send-emails-with-smtp.md)
>
> Relay settings, ports and authentication


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.