Email Service
The Email Service component provides a production-ready solution for sending emails in Servercn using nodemailer. It supports multiple email providers including Gmail, SMTP servers and more.
Installation Guide
Install this component using the following command:
npx servercn-cli add email-servicePrerequisites
Gmail Setup (Recommended for Development)
- Enable 2-Step Verification on your Google Account
- Generate an App Password:
- Go to Google Account → Security → 2-Step Verification → App passwords
- Create a new app password for "Mail"
- Copy the generated password
Environment Variables
Add the following to your .env file:
Nodemailer
Resend
Mailtrap