1.0.10 • Published 2 years ago

email-stringify v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Email Stringify

email-stringify is a utility function to stringify emails html files to string with named parameters

Installation

npm i email-stringify --save

How to use

  • Create email-files folder in project root directory
  • Create email.config.js in project root directory

Usage

email.config.js

module.exports = {
//Prefix to wrap named variables in html files 
  prefix: "%%",
//Html Files to include with an array of available variables
  files: {
    test: ["Name"],
  },
};

Get Email String

const { stringifyEmail } = require("email-stringify");
//stringifyEmail takes two paramters
// filename : name of html file
//args : Object containing each variable to change with value
const emailString = await stringifyEmail({
    filename: "test",
    args: { Name: "Ismail" },
  });

License

MIT

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.10

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago