module:sendmail
- Description:
Send email via various transports
- Source:
Members
(static) args :Array.<ConfigOptions>
- Source:
- Default Value:
[ { "name": "from", "descr": "Email address to be used when sending emails from the backend" }, { "name": "transport", "descr": "Send emails via supported transports: ses:, sendgrid:, fake:, file:, json:, if not set default SMTP settings are used" }, { "name": "smtp", "obj": "smtp", "type": "map", "merge": 1, "descr": "SMTP server parameters, user, password, host, ssl, tls...see nodemailer for details" }, { "name": "options-(.+)", "obj": "options.$1", "type": "map", "merge": 1, "descr": "Transport specific parameters", "example": "sendmail-options-sendgrid = key:xxxx\nsendmail-options-ses = config:cfg1,region:us-west-2" } ]
Methods
(static) send(options, callbackopt)
- Description:
Send email via
nodemailerwith SMTP transport, other supported transports:
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
|||||||||||||||||||||||||||||||||||||
callback |
function(err:object, data:object) |
<optional> |
(async, static) send(options) → {Object}
- Description:
Async version of module:sendmail.send
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object |
Returns:
| Type | Description |
|---|---|
| {err:object, data:object} |
Example
const { err, data } = sendmail.send({ to: "email@com", subject: "...", text: "...", html: "..." });