---
title: "Supabase 'Error sending confirmation email' (500): causes and fixes"
description: "Supabase Auth returns 500 'Error sending confirmation email', 'Error sending magic link email' or 'Error sending recovery email'. A checklist of the usual causes with custom SMTP."
updated: 2026-11-21
---

# Supabase "Error sending confirmation email" (500)

Signup, magic link or password reset fails with HTTP **500** and one of:

- `Error sending confirmation email` (also `AuthApiError: Error sending confirmation mail`)
- `Error sending magic link email`
- `Error sending recovery email`

The user is often created anyway, but the email never leaves. In almost every case Supabase reached your SMTP server and the server said no, or Supabase could not build the email.

## First: read the real error

The 500 hides the reason. The reason is in the logs:

1. Dashboard → *Logs → Auth*.
2. Filter by the time of the failed request, or search for `error` or the user's email.
3. The log entry usually contains the SMTP server's reply, for example `535 Authentication failed`, `554 Message rejected: Email address is not verified` or a TLS error.

Match it to the table below.

## Causes, from most to least common

| What the log says | Cause | Fix |
|---|---|---|
| `535`, `authentication failed`, `invalid credentials` | wrong SMTP username or password | use the provider's **SMTP credentials**. Resend: user `resend`, password = API key. Amazon SES: SMTP credentials generated in the SES console, not your IAM access keys. Brevo: SMTP login from *SMTP & API*, not your account email |
| timeout, `connection refused`, `tls: first record does not look like a TLS handshake` | port and TLS mode do not match | **465** = implicit TLS, **587** = STARTTLS. Do not use 25 |
| `domain not verified`, `sender not allowed`, `550 5.7.1` | the sender address in *SMTP Settings* is on a domain you have not verified with the provider | verify the domain (SPF and DKIM records), and use an address on that domain as the sender |
| `Email address is not verified` (SES), `sandbox` | your provider account is still in a sandbox and only sends to verified recipients | request production access from the provider, or test only with verified addresses |
| `template: ...` or a parse error | a custom email template has invalid template syntax | open *Authentication → Emails → Templates*, fix the template (for example an unclosed `{{ }}`), save, and test again |
| `hook` or an HTTP error from your function | the Send Email Hook is enabled and your function failed or timed out | check the function's logs; the hook must answer quickly with a 200 |
| `Database error saving new user` | not an email problem: a trigger on `auth.users` failed | check your trigger, often a `profiles` insert with a missing column or RLS |

## A quick end-to-end test

1. In *SMTP Settings*, save the settings again (re-entering the password).
2. In *Authentication → Users*, use *Send magic link* to your own address.
3. If it fails, the newest line in *Logs → Auth* is your answer.

## Local development

`supabase start` catches every auth email locally (Mailpit, previously Inbucket), so a 500 locally usually means a template or hook problem, not SMTP.

## Which provider?

| Provider | Free tier | Notes |
|---|---|---|
| Resend | 3,000 / month, 100 / day | SMTP and API, official Supabase integration |
| Amazon SES | none since 07.2026, about $0.10 per 1,000 | cheapest at volume; sandbox until production access is approved |
| Brevo | 300 / day | EU company, SMTP and API |
| Fanfarly (early access) | 3,000 / month, 100 / day | `npx fanfarly supabase` sets SMTP and templates, then runs a real signup test; not available yet |

Disclosure: Fanfarly is built by the author of this page.

## Related

- [over_email_send_rate_limit (email rate limit exceeded)](/errors/over-email-send-rate-limit/)
- [Email address not authorized](/errors/email-address-not-authorized/)
- [Supabase: custom SMTP](https://supabase.com/docs/guides/auth/auth-smtp) · [Supabase: Auth error codes](https://supabase.com/docs/guides/auth/debugging/error-codes)
