Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-mail

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-mail - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

6

changelog.md
0.2.2 / 2012-06-14
==================
* updated; test suite
* adding; underscore templating to subject line [danielschwartz]
0.2.1 / 2012-02-27

@@ -3,0 +9,0 @@ ==================

23

lib/winston-mail.js

@@ -8,7 +8,13 @@ /*

var util = require('util');
var os = require('os');
var email = require('emailjs');
var util = require('util');
var os = require('os');
var email = require('emailjs');
var winston = require('winston');
var _ = require('underscore');
// Set Underscore to Mustache style templates
_.templateSettings = {
interpolate : /\{\{(.+?)\}\}/g
};
/**

@@ -28,5 +34,6 @@ * @constructs Mail

this.to = options.to;
this.from = options.from || "winston@" + os.hostname()
this.level = options.level || 'info';
this.silent = options.silent || false;
this.from = options.from || "winston@" + os.hostname()
this.level = options.level || 'info';
this.silent = options.silent || false;
this.subject = options.subject ? _.template(options.subject) : _.template("winston: {{level}} {{msg}}")

@@ -42,3 +49,2 @@ this.handleExceptions = options.handleExceptions || false;

});
};

@@ -76,3 +82,3 @@

to: this.to,
subject: "winston: " + level + " " + msg,
subject: this.subject({level: level, msg: msg}),
text: body

@@ -82,3 +88,2 @@ });

this.server.send(message, function (err) {
console.log(err);
if (err) self.emit('error', err);

@@ -85,0 +90,0 @@ self.emit('logged');

{
"name": "winston-mail",
"description": "A mail transport for winston",
"version": "0.2.1",
"version": "0.2.2",
"author": "Marc Harter <wavded@gmail.com>",

@@ -15,3 +15,4 @@ "contributors": [

"dependencies": {
"emailjs": ""
"emailjs": "",
"underscore": ""
},

@@ -18,0 +19,0 @@ "devDependencies": {

@@ -41,2 +41,3 @@ # winston-mail [![Build Status](https://secure.travis-ci.org/wavded/winston-mail.png)](http://travis-ci.org/wavded/winston-mail)

* __password__ Password for server auth
* __subject__ Subject for email (default: winston: {{level}} {{msg}})
* __ssl:__ Use SSL (boolean or object { key, ca, cert })

@@ -43,0 +44,0 @@ * __tls:__ Boolean (if true, use starttls)

@@ -14,5 +14,4 @@ /*

smtp.listen(2500, function (err) {
console.log(arguments)
})
smtp.listen(2500, function (err) { if (err) console.log(err); });
smtp.on('dataReady', function (env, cb) { cb(null, 'abc'); });

@@ -22,6 +21,5 @@ function assertMail (transport) {

assert.isFunction(transport.log);
};
}
var config = helpers.loadConfig(__dirname)
var transport = new (Mail)(config.transports.mail);
var transport = new (Mail)({ to: 'wavded@gmail.com', from: 'dev@server.com', port: 2500 });

@@ -28,0 +26,0 @@ vows.describe('winston-mail').addBatch({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc