UNPKG

450 BJavaScriptView Raw
1var fs = require('fs')
2
3var sendmail = require('../sendmail')({
4 silent: true,
5 dkim: {
6 privateKey: fs.readFileSync('./dkim-private.pem', 'utf8'),
7 keySelector: 'mydomainkey'
8 }
9})
10
11sendmail({
12 from: 'test@yourdomain.com',
13 to: 'info@yourdomain.com',
14 replyTo: 'jason@yourdomain.com',
15 subject: 'MailComposer sendmail',
16 html: 'Mail of test sendmail '
17}, function (err, reply) {
18 console.log(err && err.stack)
19 console.dir(reply)
20})