npm install mailersmailing library.
js
var mailer = require("mailers").create("stub");
var message = {
from: "info@example.com",
to: "aoj@n13.cz",
subject: "hello",
text: "world"
};
mailer.sendMail(message, function (err, response) {
if(err) return console.error(err.stack);
console.log(response);
});
``create(engineName, options) Nodemailer engin one "mandrillApi". Options is object for the engine. Can contain maxConnections to setup concurrency level, default is 10.sendMail(message, cb) send email. Format of message is same as in nodemamiler.sendMailImmediately(message, cb) Send email as soon as posible, before others one queued.pause() pause sendingresume() resume paused sendingkill() stop sendingisPaused() return bool if sending is pausedconcurrency() return sending concurrencyremain() return how many emails remain in queuenow() return how many emails are sendings at the timedrain the event is called when the last item from the queue has returned from the workerempty the event is called when the last item from the queue is given to a workersaturated the event is called when the queue length hits the concurrency limit, and further tasks will be queued