The mailer module provides a way to send emails to clients/admins, etc.
- Source
Requires
Methods
(async, inner) getBody(template)
Retrieves the body of the text from the provided url/file.
Parameters:
PropertiesName | Type | Description |
---|---|---|
template | Object |
Name | Type | Description |
---|---|---|
template.text | String | The url from which to retrieve the text content using module:/provider/getFrom~flyTo. |
template.html | String | The url from which to retrieve the html content using module:/provider/getFrom~flyTo. |
- Source
(async, inner) mailer(params)
Function which sends email using the nodemailer dependancy.
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object |
Name | Type | Description |
---|---|---|
params.to | String | The email recipient. |
params.template | String | The html that will make up the body of the email. |
params.language | String | The language to be used. |
params.host | String | The URL of the instance. |
- Source
(inner) replaceStringParams(string) → {String}
Substitutes supplied params into a supplied string.
Parameters:
PropertiesName | Type | Description |
---|---|---|
string | String |
Name | Type | Description |
---|---|---|
params | Object | The url from which to retrieve the text content using module:/provider/getFrom~flyTo. |
- Source
Returns:
The string with substitutions made.
- Type:
- String