Prerequisites
Before you begin, make sure you have: You’ll also need:- A Supabase project
- A sender address on your verified domain (e.g.
noreply@yourdomain.com)
Get Your SMTP Credentials
You’ll use the following Lettr SMTP settings when configuring Supabase:| Setting | Value |
|---|---|
| Host | smtp.lettr.com |
| Port | 465 |
| Username | lettr |
| Password | Your API key (starts with lttr_) |
Configure Supabase Auth
Open SMTP settings in Supabase
- Go to your Supabase project dashboard
- Click Authentication in the left sidebar
- Click SMTP Settings under the Email provider section
- Toggle Enable Custom SMTP on
Set sender details
Fill in your sender information:
- Sender email: Your verified sending address (e.g.
noreply@yourdomain.com) - Sender name: Your application name (e.g.
My App)
Enter SMTP credentials
Enter the Lettr SMTP credentials:
- Host:
smtp.lettr.com - Port number:
465 - Username:
lettr - Password: Your Lettr API key (starts with
lttr_)
Verify It Works
After saving, trigger a test email to confirm everything is connected:- Go to Authentication → Users in your Supabase dashboard
- Click Add user → Send invitation
- Enter your own email address and send the invite
- Check your inbox for the invitation email
Custom Email Templates
Supabase lets you customize the HTML templates for each auth email type (confirmation, invite, magic link, password reset). These templates are sent through Lettr as-is. To edit templates:- Go to Authentication in your Supabase dashboard
- Click Email Templates
- Select the template type you want to customize
- Edit the HTML and save
Supabase email templates use Go template syntax with variables like
{{ .ConfirmationURL }}. These are processed by Supabase before the email is handed off to Lettr for delivery.Troubleshooting
Emails not sending after enabling custom SMTP
Emails not sending after enabling custom SMTP
- Verify the sender email uses a domain verified in Lettr
- Double-check that the host is
smtp.lettr.comand the port is465 - Ensure your API key is correct and starts with
lttr_ - Confirm the username is exactly
lettr(lowercase)
Rate limit exceeded errors
Rate limit exceeded errors
Supabase applies its own rate limits on auth emails (e.g. one confirmation per 60 seconds per address). These are separate from Lettr’s rate limits. Check your Supabase Auth settings under Rate Limits.
Emails landing in spam
Emails landing in spam
Make sure your sending domain has proper DNS records configured:
- SPF — Authorizes Lettr to send on your behalf
- DKIM — Cryptographically signs your emails
- DMARC — Tells receivers how to handle unauthenticated mail
Using port 587 instead of 465
Using port 587 instead of 465
If port 465 doesn’t work in your environment, you can use port 587 with STARTTLS instead. Both are secure — port 465 establishes an encrypted connection immediately, while 587 upgrades via STARTTLS.