1.0.6 • Published 2 years ago

email-sender-module v1.0.6

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

Email Sender Module

Email senders with variables substitution into html template for node.js backend app.

Installation

npm install email-sender-module

Configuration

To configure correctly the email sender you can set your specified parameters like this:

import emailSenderConfiguration from "../configurations/EmailSenderConfiguration";

emailSenderConfiguration.setTemplateDir([HTML_TEMPLATE_DIRECTORY]);
emailSenderConfiguration.configureEmailSender([EMAIL_SERVICE],[EMAIL_SENDER],[EMAIL_PASSWORD]);

Html template

In the template directory you can put your html files. Files can contains binding varibles which will resolve during the runtime.

<h1>Hello, ${variable}</h1>

Functions

SendEmail

Send email to specified address using specified template.

sendEmail(
  to: string, //email recipient
  subject: string, //email subject
  templateName: string, //html template
  variables: Map<string, string> //map of variables to resolve
);
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago