Docs
Email

Email

How to manage emails in this project.

Email sending is powered by Nodemailer and Gmail SMTP, integrated with Auth.js v5!
You can use it in your local environment and in your own production setup.

Steps

Gmail SMTP allows you to send transactional emails and authentication OTP / Magic Links reliably using Google's SMTP servers and an App Password.

Enable 2-Step Verification

  1. Go to your Google Account.
  2. Navigate to Security and ensure 2-Step Verification is turned ON.

Generate a Google App Password

  1. In your Google Account Security tab, search for App passwords (or visit App passwords).
  2. Enter an app name (e.g. Foulware Web App) and click Create.
  3. Copy the 16-character generated app password.

Configure Environment Variables

Copy/paste in your .env or .env.local file:

GMAIL_USER=your-email@gmail.com
GMAIL_APP_PASSWORD=your-16-character-app-password
EMAIL_FROM="Foulware <your-email@gmail.com>"

Restart the app

Restart your dev server (or redeploy) so the new env vars are loaded:

bun run dev