Add AWS SES as custom SMTP provider to Supabase

raj_savaliya

Raj Savaliya

Posted on September 24, 2024

Add AWS SES as custom SMTP provider to Supabase

If you are using Supabase Authentication then you must have recently come across this message in your Supabase Dashboard.

Image description

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.

Image description

  • Go to SMTP Settings and click on "Create SMTP Credentials"

Image description

  • Add any name you want for your SMTP user and click on Create User

Image description

  • Copy these 2 (SMTP username and SMTP password) and keep it somewhere for few minutes. (notepad) Return to SES console.

Image description

  • Now open Supabase dashboard and go to Settings -> Authentication -> Scroll Down to section called "SMTP Settings"

Image description

  • 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.

Image description

  • Host: Copy paste the SMTP endpoint in this field.

Image description

  • 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"

Image description

  • 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.

Image description

  • You will get a verification email at your email address. Check it and click on the verification link.

Image description

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.

💖 💪 🙅 🚩
raj_savaliya
Raj Savaliya

Posted on September 24, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

AWS open source newsletter, #167
opensource AWS open source newsletter, #167

July 31, 2023