Docs
Send magic link emails with Supabase and Resend
Send magic link emails with Supabase and Resend
Step-by-step guide to send magic link emails with Supabase and Resend
Why do we need SMTP server?
To send magic link emails during the sign in and sign up processes, we need an SMTP server. I recommend to use Resend. It's free for 100 emails per day, that more than enough for start project.
How to use Resend in DoFastPro
- Create a new project in Resend.
- Add your domain in the settings using official Resend instructions.
- Create a new Resend token in API keys section and copy it.
- Paste the token in the
apps/supabase/.env
file in your project forSMTP_PASS=
variable. - Replace
SMTP_SENDER_NAME
with your company name, for example. Also changeSMTP_ADMIN_EMAIL
variable with your email that will be used to send magic link emails. 6*. If you didn't change default settings, the values should beSMTP_HOST=smtp.resend.com
,SMTP_PORT=587
,SMTP_USER=resend
How to edit magic link email template?
The magic link email template should be public, so anyone can use it. Magic link email template is located in apps/web/public/templates/magic-link.html
.
You can change the template as HTML file. Don't recommend to change the href in the template, if you of course don't need a customization.