0.0.5 • Published 6 years ago

send-and-record-mail v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

SendNRecordMail is used to send mails with a mail client and record the activity in db with status

Current supported mail sender is sendgrid and db is mongo.

Installation: npm install send-and-record-mail

Usage:

var sendNRecordMail = require('send-and-record-mail');
var mongodb = require('mongodb');
mongodb.connect(config.mongo.uri, function(error, db) {
    var storage = sendNRecordMail.storage.get('mongodb', {client: db});
    var mailClient = sendNRecordMail.mailClient.get('sendgrid', {key: '<your key>'});
    var mailTracker = new sendNRecordMail.sendAndRecord(storage, mailClient, console.log, {});
    mailTracker.sendMail(sendAddress, fromMail, emailSubject, body, options); 
});
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago