In this page, we will see how to setup the environment variables that you need for the chosen SMTP provider.
Here are the available providers :
Nodemailer
Nodemailer is a popular Node.js library for sending emails via SMTP. Great for self-hosted or custom SMTP setups.
Required environment variables : EMAIL_NODEMAILER_URL
This solution is the most developer-friendly because it is an open-source project.
Other solutions are quite expensive but quicker to setup with many built-in features.
It is our favorite solution for development environments.
Gmail SMTP example
This solution is free and quick to setup. The perfect choice when you start a new project on your own.
You will need to have a gmail address.
As said in you will need to create a google application password
To create a google application password, you must enable the 2-Step Verification.
Your EMAIL_NODEMAILER_URL env variable should look like this :
# SMTP Provider (Gmail example)
EMAIL_NODEMAILER_URL=smtp://[YOUR_EMAIL_ADDRESS@gmail.com]:[YOUR_GOOGLE_APPLICATION_PASSWORD]@smtp.gmail.com:465Where :
[YOUR_EMAIL_ADDRESS@gmail.com]is your email address.[YOUR_GOOGLE_APPLICATION_PASSWORD]is your google application password.
You also need to set the EMAIL_FROM and SUPPORT_EMAIL env variables like this :
EMAIL_FROM="Your Organization Name <your-domain.smtp@gmail.com>"
SUPPORT_EMAIL="your-domain.smtp@gmail.com"Postmark
Postmark is a reliable transactional email service. Offers fast delivery and excellent deliverability for production use.
Required environment variables : EMAIL_POSTMARK_SERVER_TOKEN
To get your Postmark server token, sign in to your Postmark account, navigate to the API Tokens page, and create a new server token.
Resend
Resend is a developer-friendly email API that uses AWS SES under the hood, simplifying email setup while maintaining reliability.
Required environment variables : EMAIL_RESEND_API_KEY
To get your Resend API key, sign in to your Resend account, go to the API Keys section, and create a new API key.
SendGrid
SendGrid is a scalable cloud-based email service with advanced features for both transactional and marketing emails.
Required environment variables : EMAIL_SENDGRID_API_KEY
To get your SendGrid API key, sign in to your SendGrid account, navigate to Settings > API Keys, and create a new API key.
All you need to know to setup your SMTP server.
Premade templates for emails to make your brand more professional.
How is this guide?
Last updated on 1/29/2026