Hoppa till innehållet

Apps

Supabase Auth

Send the mail that Supabase Auth writes, such as sign-up confirmations, magic links and password resets, through Sendora’s SMTP. Supabase’s built-in email service sends only to your organisation’s team members, so it is for trying Auth out.

Before you start

  • A Sendora account. A test server works from the moment the account exists. A live server sends once your account is approved. The account starts on Free, within the limits that Account › Usage in the dashboard shows.
  • Access to the DNS of the domain that Supabase’s mail comes from.
  • Access to your project’s settings in Supabase’s dashboard.

Set up Supabase Auth

  1. Add the domain that Supabase’s mail comes from under Domains, and add the two DNS records it shows, as Domains explains.
  2. Create a test server under Servers › New server, with Testserver ticked, and create a key on its API keys tab. The key starts with sk_test_. A test server takes mail as a live server does and delivers none of it.
  3. In Supabase’s dashboard, open Authentication, then Emails and its SMTP Settings tab. Switch on Enable custom SMTP, and enter Sendora’s values:
FieldValue
Sender email addressAn address on your verified domain, such as no-reply@example.se
Sender nameThe name your users see, such as your app’s
Hostsmtp.sendora.se
Port number465
UsernameThe server key
PasswordThe server key
  1. Click Save changes.
  2. Send a message from the project, such as a sign-up from your app. Or invite someone under Authentication › Users, with Add user and then Send invitation. A test server delivers nothing, so nobody receives the message.
  3. Find the message on the server’s Messages tab under Servers.
  4. Once your account is approved, create a key on your live server’s API keys tab, such as the default server that signup made. Put it in Username and Password in place of the test key, and click Save changes.

Raise Supabase’s email limit

Supabase limits how many emails a project sends an hour, and sets the limit to 30 when you switch on custom SMTP. To send more, raise Rate limit for sending emails under Authentication › Rate Limits. Sendora’s own limits apply as well.

Self-hosted Supabase

A self-hosted Supabase takes the same values from the .env file beside its docker-compose.yml. Use the server key as both user and password:

SMTP_ADMIN_EMAIL=no-reply@example.se
SMTP_SENDER_NAME=Example
SMTP_HOST=smtp.sendora.se
SMTP_PORT=465
SMTP_USER=sk_test_…
SMTP_PASS=sk_test_…

Then run docker compose up -d, which restarts Auth with the new values. If Supabase runs on a host that blocks ports 465 and 587, such as a DigitalOcean Droplet, set SMTP_PORT=2525. Supabase Auth then encrypts the connection with STARTTLS before it signs in.

If a message is refused

Supabase answers the request with a 500 error, such as Error sending confirmation email, and its Auth logs hold Sendora’s reply. 535 5.7.8 means the key is wrong or revoked. 550 5.7.1 means the sender’s domain is not verified, or that a live server’s account is not yet approved. 451 4.7.0 means that a limit is reached, such as Free’s daily limit. 550 5.1.1 means the recipient’s address is on the suppression list, for example after a hard bounce. SMTP replies lists every reply.

Test the setup

On the server’s API keys tab under Servers, Test the setup shows each valid key’s latest sign-in and accepted message over SMTP. It also shows the key’s latest refusals, each with what to do. After Supabase Auth sends a message, click Check now.