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

  1. Create a new project in Resend.
  2. Add your domain in the settings using official Resend instructions.
  3. Create a new Resend token in API keys section and copy it.
  4. Paste the token in the apps/supabase/.env file in your project for SMTP_PASS= variable.
  5. Replace SMTP_SENDER_NAME with your company name, for example. Also change SMTP_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 be SMTP_HOST=smtp.resend.com, SMTP_PORT=587, SMTP_USER=resend

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.