AuthApiError: Error sending confirmation mail
Problem
Bug report - [x] I confirm this is a bug with Supabase, not with my own application. - [x] I confirm I have searched the Docs, GitHub Discussions, and Discord. Describe the bug Sometimes, the sign up function returns the following error: `AuthApiError: Error sending confirmation mail at handleError (webpack-internal:///(action-browser)/./node_modules/.pnpm/@supabase+gotrue-js@2.62.0/node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:46:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async _handleRequest (webpack-internal:///(action-browser)/./node_modules/.pnpm/@supabase+gotrue-js@2.62.0/node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:93:9) at async _request (webpack-internal:///(action-browser)/./node_modules/.pnpm/@supabase+gotrue-js@2.62.0/node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js:73:18) at async SupabaseAuthClient.signUp (webpack-internal:///(action-browser)/./node_modules/.pnpm/@supabase+gotrue-js@2.62.0/node_modules/@supabase/gotrue-js/dist/module/GoTrueClient.js:236:23) at async signUp (webpack-internal:///(action-browser)/./src/app/cadastro/_actions/index.ts:26:17) at async project_folder\node_modules\.pnpm\next@14.1.0_@babel+core@7.23.7_react-dom@18.2.0_react@18.2.0\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:406 at async t4 (project_folder\node_modules\.pnpm\next@14.1.0_@babel+core@7.23.7_react-dom@18.2.0_react@18.2.0\n
Error Output
error: `AuthApiError: Error sending confirmation mail
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix AuthApiError: Error Sending Confirmation Mail in Supabase
The error occurs when the Supabase authentication service fails to send a confirmation email, likely due to misconfiguration of the email settings or issues with the email provider. This can happen if the SMTP server is not correctly set up, the email provider is blocking the requests, or the email template is missing or incorrectly configured.
Awaiting Verification
Be the first to verify this fix
- 1
Verify SMTP Configuration
Check the SMTP settings in your Supabase project. Ensure that the SMTP server, port, username, and password are correctly configured. This can be done in the Supabase dashboard under 'Authentication' -> 'Settings' -> 'Email'.
- 2
Test SMTP Connection
Use a tool like Telnet or an SMTP testing tool to verify that you can connect to the SMTP server from your environment. This will help identify if there are any connectivity issues.
bashtelnet smtp.example.com 587 - 3
Check Email Provider Restrictions
Ensure that your email provider is not blocking the requests from Supabase. Some providers have restrictions on sending emails from third-party services. Review the provider's documentation for any such limitations.
- 4
Review Email Template
Check the email template used for sending confirmation emails. Ensure that it is correctly set up and does not contain any errors that might prevent it from being sent.
- 5
Monitor Logs for Errors
Check the logs in the Supabase dashboard for any error messages related to email sending. This can provide additional context on what might be causing the issue.
Validation
After implementing the above steps, attempt to sign up a new user and verify that the confirmation email is sent successfully. Monitor the Supabase logs for any errors during this process.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep