Updated 23 November 2026
You can send emails from a feature template through your own email provider by setting four values in .env.
Settings
MAIL_PROVIDERisresend,smtporconsole.MAIL_FROMis the address the emails come from.RESEND_API_KEYis your Resend key. Use it withresend.SMTP_URLis the address of your mail server. Use it withsmtp.
Test with the console
- Set
MAIL_PROVIDER=consolein.env. - Run
npm run dev. - Trigger an email, for example a sign-up.
- Read the email in the terminal. The console provider prints emails there. Nothing is sent.
Use SMTP
- Get the SMTP details from your email provider.
- Set
MAIL_PROVIDER=smtp. - Set
SMTP_URL, for examplesmtp://user:pass@mail.example.com:587. - Set
MAIL_FROMto an address your provider allows you to send from. - Restart the site and trigger an email.
Use Resend
- Create a Resend account and an API key.
- Set
MAIL_PROVIDER=resend. - Set
RESEND_API_KEYto your key. - Set
MAIL_FROMto an address on a domain you have set up in Resend. - Restart the site and trigger an email.
Links inside emails use SITE_URL, so set it to your public address. See Accounts and database. If an email does not arrive, see Troubleshooting.
