Skip to content

byteboomers/mermail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mermail

Generate responsive transactional HTML emails

About

This library was inspired by mailgen but uses MJML JSON definitions instead of the EJS templating language.

Installation

npm install mermail mjml

npm package link

Example

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"]
});

screenshot

About

Generate responsive transactional HTML emails

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published