Sending Emails
Nodemailer
Configure Nodemailer (SMTP) provider for sending transactional emails.
1. Export Nodemailer provider
In src/lib/email/index.ts, export the provider:
export * from './providers/nodemailer';2. Add SMTP environment variables
Set these values in your .env:
EMAIL_SERVER_USER: z.string(),
EMAIL_SERVER_PASSWORD: z.string(),
EMAIL_SERVER_HOST: z.string(),
EMAIL_SERVER_PORT: z.preprocess(Number, z.number()),Example .env values:
EMAIL_SERVER_USER=mailer_user
EMAIL_SERVER_PASSWORD=mailer_password
EMAIL_SERVER_HOST=smtp.your-provider.com
EMAIL_SERVER_PORT=4653. Send emails
After exporting Nodemailer, import sendEmail from @/lib/email in server-side code and call it with your template.