UNPKG

505 BJavaScriptView Raw
1"use strict";
2
3const EmailSender = require('./EmailSender');
4
5/**
6 * Stub email sending that prints to console instead of sending email.
7 */
8class NodeEmailSender extends EmailSender
9{
10 sendImplementation(to, from, subject, body)
11 {
12 return new Promise((resolve) =>
13 {
14 console.log('EMAIL FROM:', from);
15 console.log('EMAIL TO:', to);
16 console.log('EMAIL SUBJECT:', subject);
17 console.log('EMAIL BODY:', body);
18 resolve();
19 });
20 }
21}
22
23module.exports = NodeEmailSender;