https://github.com/byteboomers/mermail
Generate responsive transactional HTML emails
https://github.com/byteboomers/mermail
email responsive-email
Last synced: 3 months ago
JSON representation
Generate responsive transactional HTML emails
- Host: GitHub
- URL: https://github.com/byteboomers/mermail
- Owner: byteboomers
- License: mit
- Created: 2019-06-05T14:01:58.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-02T19:48:27.000Z (almost 6 years ago)
- Last Synced: 2025-01-28T09:16:04.726Z (4 months ago)
- Topics: email, responsive-email
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mermail
Generate responsive transactional HTML emails
## About
This library was inspired by [mailgen](https://github.com/eladnava/mailgen) but uses MJML JSON definitions instead of the EJS templating language.
## Installation
```bash
npm install mermail mjml
```[npm package link](https://www.npmjs.com/package/mermail)
## Example
```javascript
const Mermail = require("mermail");const mermail = new Mermail();
const html = mermail.simple({
logo: "https://cdn.byteboomers.com/img/logo/png/byteboomers--64x64.png",
title: "Welcome",
intro: [
"Hello James",
"You have received this email because a password reset request for your account was received.",
"Click the button below to reset your password:"
],
cta: {
text: "Reset your password",
link: "https://byteboomers.com/reset-password"
},
outro: ["The Byteboomers team"],
links: [
{
text: "Home page",
link: "https://byteboomers.com"
},
{
text: "Follow us on Twitter",
link: "https://twitter.com/byteboomers"
}
],
footer: ["© 2019 Byteboomers"]
});
```