Skip to content

Acconut/scrib-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrib-mail

An adapter for Scrib to notify you about your logs using mails.

Example

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.

Options

  • to: A single e-mail address or an array containing them where to send the mails
  • from: A object to set up SMTP (see here)
  • from.address: The e-mail address which sends the mail
  • format = null: A function which formats the mail (see code)

Testing

Currently there is no testing available because it requires a mailserver.

Licensed under the MIT License.

About

An adapter for Scrib to notify you about your logs using mails.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors