Emails

This project uses nextauth which requires email magic link authentication with the Email auth provider.

This project also uses maildev for local development and testing of emails.

Email magic link authentication is not needed for Social Login.

Setup Maildev

Setup with Maildev is required for local development and testing, Maildev is not used in Prod.

An alternative can be using a hosted solution like Mailtrap instead, see next section.

More info on Maildev can be found here.

https://github.com/maildev/maildev (opens in a new tab)

Mailtrap (optional)

If you don`t want to use maildev or docker, you can use a hosted solution like Mailtrap. Simply modify to nodemailer transport to send emails to mailtrap instead

https://mailtrap.io/blog/sending-emails-with-nodemailer/ (opens in a new tab)

react-emails

The emails themselves are built with react components from the react-email library. See docs for more details.

https://react.email/docs/introduction (opens in a new tab)

Production Emails

For sending out real emails in Prod, this project uses resend api. Resend API has excellent DX and was chosen due to the ease of working with it.

If you would like to use another email provider see the next section “Switching Email Providers”

See link below for more information on Resend:

https://resend.com (opens in a new tab)