Emails

In this part of the documentation, we will show you how to integrate SMTP to be able to send transactional emails and magic links for authentication.

Get The SMTP Credentials

Follow the steps below to integrate SMTP into your Boilerplate. Note: we will be using Resend as our SMTP provider. You can use any SMTP provider you want.

  1. Login to Resend, if you don’t have an account, go ahead and create one.

  2. Generate API Key: Go to API Keys and click on the Create API Key button

  1. Get the SMTP PORT and HOST: Go to Settings then go to SMTP you can see all of them here

Go ahead and copy these and then update the env file

EMAIL_SERVER_HOST=
EMAIL_SERVER_PORT=
EMAIL_SERVER_USER=
EMAIL_SERVER_PASSWORD=YOUR_SMTP_PASSWORD(for Resend it's the API KEY)
EMAIL_FROM=YOUR_EMAIL_TO_SEND_FROM

Verify Domain

One last thing we have to do is verify the Domain. Without verifying the domain the email will not reach the destination.

Go to the Domains->Add domains and follow the instructions on the screen to verify your domain.

Last updated