Error sending confirmation email on Self Hosted instance

I have a self hosted supabase project, where i am facing the above issue. My logs are showing the following "api","error":"unsupported protocol: "" only postgres hooks and HTTPS functions are supported at the moment", I was not facing these issues locally, so i was thinking, maybe its an issue with my .env setup for docker-compose.yml These are my following variables General SITE_URL="http://xxxxxxxx:3000" ADDITIONAL_REDIRECT_URLS=https://xxxxxxxx,http://xxxxxxxx:3000/api/auth/callback JWT_EXPIRY=3600 DISABLE_SIGNUP=false API_EXTERNAL_URL="http://xxxxxxxx:8000" Mailer Config MAILER_URLPATHS_CONFIRMATION="/auth/v1/verify" MAILER_URLPATHS_INVITE="/auth/v1/verify" MAILER_URLPATHS_RECOVERY="/auth/v1/verify" MAILER_URLPATHS_EMAIL_CHANGE="/auth/v1/verify" MAILER_EXTERNAL_HOSTS="xxxxxxxx" Email auth ENABLE_EMAIL_SIGNUP=true ENABLE_EMAIL_AUTOCONFIRM=false SMTP_ADMIN_EMAIL=testing@lungicolor.shop SMTP_HOST=smtp-relay.brevo.com SMTP_PORT=587 SMTP_USER=xxxxxxxx@smtp-brevo.com SMTP_PASS=xxxxxxxx SMTP_SENDER_NAME=TESTING ENABLE_ANONYMOUS_USERS=false
6 Replies
inder
inder2w ago
This error message doesn't have to do with smtp config. I believe you're using invalid protocol with auth hooks
MightyPeasant
MightyPeasantOP2w ago
i figured out that it seems to be a problem with setting the sender mail url in docker-compose.yml
GOTRUE_HOOK_SEND_EMAIL_ENABLED: "true"
# GOTRUE_HOOK_SEND_EMAIL_URI: ${MAILER_SEND_URL}
GOTRUE_HOOK_SEND_EMAIL_ENABLED: "true"
# GOTRUE_HOOK_SEND_EMAIL_URI: ${MAILER_SEND_URL}
Should I uncomment GOTRUE_HOOK_SEND_EMAIL_URI.? If so, then what would be the value of MAILER_SEND_URL? It used to be the following # GOTRUE_HOOK_SEND_EMAIL_URI: "http://host.docker.internal:54321/functions/v1/email_sender" but it was giving me an error My supabase project is mounted on supabase.mydomain.com i tried the following https://supabase.mydomain/functions/v1/email_sender but it seems like its expecting the an edge functions named as email_sender. But I thought its already made by supabase internally
inder
inder2w ago
Are you using the email hook? Or only setting up the SMTP config If you're not using email hook then you can completely remove this env.
MightyPeasant
MightyPeasantOP2w ago
Thank you so much I thought i was supposed set it to true to enable sending email now it works
inder
inder2w ago
email hook is used to have complete control over sending email. Then supabase auth doesn't consider any smtp config you provided. It simply calls your hook and its upto you how you decide to send email for example if you wanted emails with different languages
MightyPeasant
MightyPeasantOP2w ago
hmm makes sense

Did you find this page helpful?