Mail.js is an open-source JavaScript library for rendering HTML and text emails. Version 0.1.18 is current, with infrequent releases. It focuses on email rendering via CSS inlining and HTML-to-text conversion, differentiating itself as a lightweight browser/Node solution for email generation without heavy dependencies. Supports ESM and CJS.
npm install mailjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Mail instance, renders HTML with CSS inlining, and outputs formatted HTML and plain text.
Use await or .then() when calling render.
Use async/await instead of callback parameters.
Preprocess CSS to inline styles manually for robust email rendering.
Use 'import Mail from 'mailjs'' instead of require.
Use 'new Mail()' to create an instance.
Run 'npm install mailjs' and ensure import path is correct.
No dependency data recorded yet.