For builders shipping this week
"Error sending confirmation email" on signup? 5 checks for Supabase custom SMTP
You signed up before you switched to your own email provider, so the form worked. Your first real user signs up after the switch, and Supabase answers with a 500. Most generated forms then show "Something went wrong", or nothing at all. FirstUser opens your live URL like a brand-new visitor, signs up, logs in and tells you which step failed, with a screenshot and a fix prompt for Lovable, Bolt or Cursor. Run a free signup test.
When Supabase Auth can't hand the confirmation email to your mail provider, the sign-up request fails with HTTP 500 (the response may also carry an error_id):
{"code":500,"error_code":"unexpected_failure","msg":"Error sending confirmation email"}The same failure has siblings: "Error sending magic link email", "Error sending recovery email" (password reset) and "Error sending invite email". They all mean one thing: Supabase talked to your SMTP server and the server said no, or never answered.
The important part: the reason is not in that response. Supabase keeps the provider's answer as an internal error and writes it to your Auth logs. Your app only ever sees the generic sentence.
This is not the same as email rate limit exceeded (429) or "Email address not authorized" (400, the built-in sender only mails your team). And if sign-up succeeds but the email never shows up, see confirmation email not receiving.
1. Read the real reason in the Auth logs
Open Logs, set the Log Type to Auth, and find the failed /signup request from the minute you tried it. The log line carries the provider's answer, often starting with gomail: could not send email. Supabase's own troubleshooting guide says that gomail means Auth is struggling to talk to your SMTP provider, usually because of a domain that isn't set up correctly with the provider, the wrong port, rate limiting on the provider's side, or provider downtime.
Real log lines people have posted publicly:
450 The yourdomain.com domain is not verified. Please, add and verify your domain on https://resend.com/domains→ the sender domain (check 3)554 5.7.1 Demo domains can only be used to send emails to account owners.→ a test or demo sender (check 3)
Don't guess before you've read this line. Each fix below matches one kind of answer.
2. Host, port and SMTP login
Open Authentication → Emails → SMTP Settings. Supabase's SMTP settings need four values from your provider: host, port, username and password.
- Host: the bare hostname, for example
smtp.resend.com. Nohttps://, no port appended. - Port: the one your provider lists for SMTP. Resend lists 465; Supabase's own example uses 587.
- Username and password: the SMTP credentials, not your account login. With Resend the username is literally
resendand the password is an API key.
Fix and save, then sign up again with a new address. If the log line changes, you're making progress.
3. The sender address isn't on a verified domain
Email providers only send from domains you've proven you own. If the Sender email in Supabase is hello@yourapp.com but yourapp.com isn't verified at your provider, or the API key belongs to a different account, every message is refused. Test and demo senders are often limited to your own address, so they work for you and fail for everyone else.
Fix: verify the domain at your provider (it gives you DNS records to add), then set the Sender email to an address on that exact domain. Supabase also recommends setting up DKIM, DMARC and SPF.
4. A broken email template
Edit templates on the Email Templates page in the dashboard. If you edited the confirmation template, a typo can break every send. Supabase's troubleshooting guide names unclosed variable tags, unclosed HTML elements and forbidden characters as causes of 500 errors. Paste back a plain version of the template, try again, and then add your changes back bit by bit.
Remember that the magic-link and reset-password templates go through the same SMTP settings. Fix one, then test all three.
5. Your form swallows the error
Even with the mail path fixed, the next outage at your provider will look the same to users. Show something useful:
const { error } = await supabase.auth.signUp({ email, password })
if (error?.status === 500) {
// e.g. "Error sending confirmation email"
showFormError("We couldn't send your confirmation email. Please try again in a few minutes.")
logError(error) // so you see it before your users tell you
}Check error.status, not only error.code: depending on your supabase-js version, a 500 arrives either as an AuthApiError or as an AuthRetryableFetchError that has no code. Then look under Authentication → Users: if the address is there, offer the resend button once mail works; if not, the person just signs up again.
Don't "fix" this by turning off email confirmation. Sign-up would pass, but password reset and magic links use the same mail path and would still fail with "Error sending recovery email" or "Error sending magic link email".
Test it like a stranger, after every change
Use a private window, your real live domain and an email address that has never signed up and isn't on your team. Sign up, then also request a password reset and a magic link if your app has them. Each should either arrive or show a clear message. If you'd rather not repeat that after every prompt, let FirstUser be the first user.
FAQ
It worked yesterday. What changed?
Usually the mail setup, not your code: a new SMTP provider, a rotated API key, a new sender address, or an edited template. Supabase also starts custom SMTP at a limit of 30 emails per hour. If you hit that limit you'll see a 429 "email rate limit exceeded", not this 500. See Email rate limit exceeded.
The Auth log shows nothing about SMTP.
Then the send may not have gone through SMTP at all. If you set up a Send Email hook, Supabase calls your hook instead of SMTP, and a failing hook returns its own error. Check the hook's logs. If the email address itself is rejected, see valid email rejected at signup.
The email is sent, but the link fails.
That's a different problem. See "Email link is invalid or has expired" or reset link opens localhost.
Is this specific to Lovable?
No. Any app that uses its own Supabase project with custom SMTP behaves this way, whether it was built with Lovable, Bolt, Cursor, Replit or by hand. Lovable Cloud's built-in backend does not expose custom SMTP fields (use More → Emails for a sending domain). This guide is for apps that use their own Supabase project.
Can FirstUser catch this?
FirstUser signs up on your live URL with a new email. It does not open your Supabase dashboard or read your Auth logs. If your page shows the error text in a visible role="alert" or data-error element, the sign-up step is marked failed with "The sign-up form was rejected." and the diagnosis includes that text. If the page shows nothing, the step fails with "Sign-up was submitted, but the page did not show a success state." Either way you get a screenshot of the step. Run a free signup test.