The mailer module provides a way to send emails to clients/admins, etc.

Requires

Methods

(async, inner) getBody(template)

Retrieves the body of the text from the provided url/file.

Parameters:
NameTypeDescription
templateObject
Properties
NameTypeDescription
template.textString

The url from which to retrieve the text content using module:/provider/getFrom~flyTo.

template.htmlString

The url from which to retrieve the html content using module:/provider/getFrom~flyTo.

(async, inner) mailer(params)

Function which sends email using the nodemailer dependancy.

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeDescription
params.toString

The email recipient.

params.templateString

The html that will make up the body of the email.

params.languageString

The language to be used.

params.hostString

The URL of the instance.

(inner) replaceStringParams(string) → {String}

Substitutes supplied params into a supplied string.

Parameters:
NameTypeDescription
stringString
Properties
NameTypeDescription
paramsObject

The url from which to retrieve the text content using module:/provider/getFrom~flyTo.

Returns:

The string with substitutions made.

Type: 
String