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

smtp-server

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smtp-server - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

16

lib/smtp-stream.js

@@ -183,3 +183,5 @@ 'use strict';

// emit what we already have and continue without the dot
this._dataStream.write(buf);
if (this._dataStream.writable) {
this._dataStream.write(buf);
}

@@ -205,5 +207,9 @@ return setImmediate(this._feedDataStream.bind(this, chunk.slice(i + 1), done));

// write to stream but stop if need to wait for drain
handled = this._dataStream.write(buf);
if (!handled) {
this._dataStream.once('drain', done);
if (this._dataStream.writable) {
handled = this._dataStream.write(buf);
if (!handled) {
this._dataStream.once('drain', done);
} else {
return done();
}
} else {

@@ -243,3 +249,3 @@ return done();

if (chunk && chunk.length) {
if (chunk && chunk.length && this._dataStream.writable) {
this._dataStream.end(chunk);

@@ -246,0 +252,0 @@ } else {

{
"name": "smtp-server",
"version": "1.0.1",
"version": "1.0.2",
"description": "Create custom SMTP servers on the fly",

@@ -5,0 +5,0 @@ "main": "lib/smtp-server.js",

@@ -5,2 +5,5 @@ # smtp-server

[![Build Status](https://secure.travis-ci.org/andris9/smtp-server.svg)](http://travis-ci.org/andris9/Nodemailer)
[![npm version](https://badge.fury.io/js/smtp-server.svg)](http://badge.fury.io/js/smtp-server)
Requires Node v0.12 or iojs. The module does not run on Node v0.10 as it uses [Buffer.compare](http://nodejs.org/api/buffer.html#buffer_class_method_buffer_compare_buf1_buf2) and [TLSSocket](http://nodejs.org/api/tls.html#tls_new_tls_tlssocket_socket_options).

@@ -175,3 +178,3 @@

if(address.address !== 'allowed@example.com'){
return new Error('Only allowed@example.com is allowed to send mail');
return callback(new Error('Only allowed@example.com is allowed to send mail'));
}

@@ -204,3 +207,3 @@ return callback(); // Accept the address

if(address.address !== 'allowed@example.com'){
return new Error('Only allowed@example.com is allowed to receive mail');
return callback(new Error('Only allowed@example.com is allowed to receive mail'));
}

@@ -207,0 +210,0 @@ return callback(); // Accept the address

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