An adapter for Scrib to notify you about your logs using mails.
npm install Acconut/scrib-mail
var Scrib = require("scrib"),
logger = new Scrib({
"mail": {
to: "hans.meier@goodmail.org",
from: {
host: "mail.mysite.com",
auth: {
user: "logger",
pass: "password"
},
address: "Logger <logger@mysite.com>"
}
}
}, function(err) {
if(err) throw err;
logger.put("Hello World", { node: "up" }, 4, "HELLO", "Greetings");
});This example will send you an e-mail to hans.meier@goodmail.org which was sent from logger@mysite.com.
to: A single e-mail address or an array containing them where to send the mailsfrom: A object to set up SMTP (see here)from.address: The e-mail address which sends the mailformat = null: A function which formats the mail (see code)
Currently there is no testing available because it requires a mailserver.
Licensed under the MIT License.