# boundaryString()
Returns a boundary string. console.log(mailmake.boundaryString());
Returns
String
Boundary string.
# generate(input, options, options.from, options.subject, options.to)
Returns generated mime file contents based on either file or string. mailmake.generate('email.html', { 'from': '[email protected]', 'subject': 'Hello World!', 'to': 'mailing-l[email protected]' }).then(output => { console.log(output); });
Parameters
Name | Types | Description |
---|---|---|
input | String |
File path or string of email contents. Can be either HTML or Markdown. |
options | String |
Options for generating file. |
options.from | String |
From address of email. |
options.subject | String |
Subject of email. |
options.to | String |
To address of email. |
Returns
Object
Promise returns contents of generated mime file.
# generateFromString(input, options, options.from, options.subject, options.to)
private method
Returns generated mime file contents. console.log(mailmake.generateFromString('# Hello World!', { 'from': '[email protected]', 'subject': 'Hello World!', 'to': '[email protected]' }));
Parameters
Name | Types | Description |
---|---|---|
input | String |
String of email contents. Can be either HTML or Markdown. |
options | String |
Options for generating file. |
options.from | String |
From address of email. |
options.subject | String |
Subject of email. |
options.to | String |
To address of email. |
Returns
String
Returns contents of generated mime file.
# randomString()
Returns a randomly generated string based on seed. console.log(mailmake.randomString());
Returns
String
Randomly generated string.