@unitetech/email-utils
v1.0.6
Published
Reusable Node.js email utility library for microservices.
Downloads
20
Readme
Email Utils
Reusable Node.js email utility library for microservices.
Features
- Nodemailer-based email sending
- Modular transport, sendEmail, and templates
- TypeScript type safety
- Handlebars for HTML templates
- Unit tested with Jest
Usage
import { sendEmail, templates } from "@your-org/email-utils";
await sendEmail({
to: "[email protected]",
subject: "Welcome!",
...templates.welcome({ name: "User" }),
});Environment Variables
EMAIL_HOSTEMAIL_PORTEMAIL_USEREMAIL_PASSEMAIL_FROM(optional)
Templates
- OTP
- Welcome
- Legal Notice
Testing
npm test