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.0.1 to 0.1.0

changelog.md

7

lib/winston-mail.js

@@ -9,2 +9,3 @@ /*

var util = require('util');
var os = require('os');
var mail = require('mail');

@@ -21,4 +22,4 @@ var winston = require('winston');

if(!options.to){
throw "winston-mail requires 'to' property";
if(!options.to || !options.host){
throw "winston-mail requires 'to' and 'host' property";
}

@@ -28,3 +29,3 @@

this.to = options.to;
this.from = options.from || "no-reply@winston.com";
this.from = options.from || "winston@" + os.hostname()
this.level = options.level || 'info';

@@ -31,0 +32,0 @@ this.silent = options.silent || false;

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

@@ -6,0 +6,0 @@ "contributors": [],

@@ -13,3 +13,3 @@ # winston-mail

### Installing winston-mongodb
### Installing winston-mail

@@ -29,3 +29,3 @@ ``` bash

//
require('winston-mongodb').Mail;
require('winston-mail').Mail;

@@ -35,5 +35,6 @@ winston.add(winston.transports.Mail, options);

The Mail transport uses [node-mail](https://github.com/weaver/node-mail) behind the scenes. Options are the following, `to` is required:
The Mail transport uses [node-mail](https://github.com/weaver/node-mail) behind the scenes. Options are the following, `to` and `host` are required:
* __to:__ The name of email address(es) you want to send to. *[required]*
* __to:__ The address(es) you want to send to. *[required]*
* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)
* __host:__ SMTP server hostname

@@ -47,2 +48,2 @@ * __port:__ SMTP port (default: 587 or 25)

[0]: https://github.com/indexzero/winston
[0]: https://github.com/flatiron/winston
/*
* mongodb-test.js: Tests for instances of the MongoDB transport
* winston-mail-test.js: Tests for instances of the Mail transport
*

@@ -13,2 +13,4 @@ * (C) 2011 Marc Harter

console.log('Note this test file uses a internal SMTP server, modify fixtures/test-config to your SMTP server');
function assertMail (transport) {

@@ -15,0 +17,0 @@ assert.instanceOf(transport, Mail);

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