If you are using Supabase Authentication then you must have recently come across this message in your Supabase Dashboard.
As per this message,
On 26th September: Auth email sending will be restricted to your organization's members
To fight abuse, emails sent by Auth will be restricted to the members of this project's organization. Set up a custom SMTP provider before then to send messages to any user and avoid disruptions.
It is being advised by supabase to setup a custom SMTP provider in our supabase project to continue being able to send email.
Best SMTP provider would be AWS SES (Simple Email Service). It's dirt cheap and has higher rate limit of sending emails.
Here are few steps to setup AWS SES as custom SMTP provider in Supabase:
Have an AWS Account
Go to SES in AWS. you will see something like this.
- Go to SMTP Settings and click on "Create SMTP Credentials"
- Add any name you want for your SMTP user and click on Create User
- Copy these 2 (SMTP username and SMTP password) and keep it somewhere for few minutes. (notepad) Return to SES console.
- Now open Supabase dashboard and go to Settings -> Authentication -> Scroll Down to section called "SMTP Settings"
Turn on the "Enable Custom SMTP" Radio and Fill Sender email and Sender Name fields.
Sender email is basically the email you are sending from to the user.
Sender Name is the name that appears on the email message.
Now scrolldown to "SMTP Provider settings". Here you need to fill the given fields.
- Host: Copy paste the SMTP endpoint in this field.
In Username and Password, add the username and password i asked you to save in Point 5.
Save it.
Now one more thing to do is to whitelist your Sender Email so AWS SES allows that email to send emails using that. For that go back to AWS SES dashboard and click on "Identities"
- Click on "Create Identity". Copy the email that you pasted as "Sender email" in Supabase Dashboard, and paste it in the given "Email Address" Field.
- You will get a verification email at your email address. Check it and click on the verification link.
That's it! Now Supabase will use your custom SMTP Email provider for sending emails.
Let me know in comments if you have any doubts.
Top comments (0)