1 | ;
|
2 |
|
3 | const EmailSender = require('./EmailSender');
|
4 | const callback = require('../helper/callback');
|
5 | let sendmail = require('sendmail');
|
6 |
|
7 | sendmail = sendmail();
|
8 |
|
9 | /**
|
10 | * Send email using node.js sendmail.
|
11 | *
|
12 | * Requires ```sendmail``` package.
|
13 | */
|
14 | class 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 |
|
27 | module.exports = NodeEmailSender;
|