To send transactional emails, your app needs an email provider. Our boilerplate templates use Resend
You can also use any SMTP provider you prefer. If you do, you’ll need to update the /lib/auth.ts
file with your provider’s configuration.
Steps to set up Resend:
1. Get your API key
- Login to your Resend account.
- Go to API Keys and click Create API Key.
- A popup will appear where you can set a name for your new API key. Once you are done copy the API Key and add it to the .env file.
.env
RESEND_API_KEY=your-api-key
2. Verify your domain
-
Navigate to the Domains section in Resend.
-
Add your sending domain and follow the instructions to verify it (DNS records may need to be updated).
If you get stuck, checkout the official documentation to verify domain .
3. Test your emails
Once the API key and domain are set up, your template can send transactional emails.
You can send a test email from your local environment to confirm everything works.
Last updated on