🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

book-email

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

book-email

email transport for book logging framework

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

book-email is an email transport for the book logging framework. It will send the log message via email.

installation

npm install book-email

use

book-email is used like all other book middleware. Just add it to your logger object. I recommend you create a file log.js for your project where you setup the logger however you desire across your entire project.

// some logger you have created
var log = require('book').default();

// adds the email logging middleware to the logger
log.use(require('book-email')({
    from: 'noreply@example.com',
    to: 'problems@example.com',
    host: 'smtp.example.com',
    port: 587,

    // optional
    tls: true,
    user: 'foo',
    password: 'bar'
});

// log stuffs, it will be emailed out
log.info('hello world!');

An email will be dispatched to the specified smtp server with the json log entry

FAQs

Package last updated on 10 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts