createNodemailerProvider (providers/nodemailer.ts)

ShipFree · src/lib/messaging/email/providers/nodemailer.ts · typescript · MIT
email

Nodemailer email provider that sends single or batch emails via SMTP, configurable via environment variables.

// Source: https://github.com/revokslab/ShipFree | License: MIT | Copyright 2026 Revoks
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Nodemailer Email Provider
 *
 * Generic SMTP client for sending emails through any SMTP server.
 * https://nodemailer.com
 *
 * To use this provider:
 * 1. Install: bun add nodemailer && bun add -D @types/nodemailer
 * 2. Set environment variables:
 *    - SMTP_HOST: Your SMTP server host
 *    - SMTP_PORT: Your SMTP server port
 *    - SMTP_USER: SMTP username
 *    - SMTP_PASS: SMTP password
 *    - SMTP_SECURE: "true" for TLS, "false" for STARTTLS (optional)
 * 3. Set EMAIL_PROVIDER=nodemailer in your .env
 *
 * To remove this provider if not needed:
 * 1. Delete this file
 * 2. Remove nodemailer from package.json
 * 3. Remove SM

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key