blob: b41bae520fe6c45e880e2f00c9cec5e9c89a27e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const consoleBackend = {
send: ({ recipients, subject, body, cc, bcc }) => {
if (!recipients) throw new Exception('Recipients missing');
if (!subject) throw new Exception('Subject missing');
console.log('Email sent to console.');
console.log('=== To:', recipients.join(', '));
if (cc) console.log('=== CC:', cc.join(', '));
if (bcc) console.log('=== BCC:', bcc.join(', '));
console.log('=== Subject:', subject);
console.log();
console.log('=== Body:');
console.log(body);
console.log('===');
},
};
module.exports = {
consoleBackend,
};
|