UNPKG

486 BJavaScriptView Raw
1"use strict";
2
3const EmailSender = require('./EmailSender');
4const callback = require('../helper/callback');
5let sendmail = require('sendmail');
6
7sendmail = sendmail();
8
9/**
10 * Send email using node.js sendmail.
11 *
12 * Requires ```sendmail``` package.
13 */
14class NodeEmailSender extends EmailSender
15{
16 sendImplementation(to, from, subject, body)
17 {
18 return callback(sendmail, {
19 from,
20 to,
21 subject,
22 html: body,
23 });
24 }
25}
26
27module.exports = NodeEmailSender;