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

smtp-connection

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smtp-connection - npm Package Compare versions

Comparing version 2.0.0-beta.4 to 2.0.0-beta.5

4

CHANGELOG.md
# Changelog
## v2.0.0-beta.5 2016-01-03
* Fixed a bug where errors might been thrown before a handler was set
## v2.0.0-beta.3 2016-01-03

@@ -4,0 +8,0 @@

24

lib/smtp-connection.js

@@ -282,7 +282,24 @@ 'use strict';

*/
SMTPConnection.prototype.send = function (envelope, message, callback) {
SMTPConnection.prototype.send = function (envelope, message, done) {
if (!message) {
return callback(this._formatError('Empty message', 'EMESSAGE'));
return done(this._formatError('Empty message', 'EMESSAGE'));
}
// ensure that callback is only called once
var returned = false;
var callback = function () {
if (returned) {
return;
}
returned = true;
done.apply(null, Array.prototype.slice.call(arguments));
};
if (typeof message.on === 'function') {
message.on('error', function (err) {
return callback(this._formatError(err, 'ESTREAM'));
}.bind(this));
}
this._setEnvelope(envelope, function (err, info) {

@@ -301,5 +318,2 @@ if (err) {

message.pipe(stream);
message.on('error', function (err) {
return callback(err);
});
} else {

@@ -306,0 +320,0 @@ stream.write(message);

{
"name": "smtp-connection",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "Connect to SMTP servers",

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

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