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 0.1.7 to 1.0.0

CHANGELOG.md

2

package.json
{
"name": "smtp-connection",
"version": "0.1.7",
"version": "1.0.0",
"description": "Connect to SMTP servers",

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

@@ -119,2 +119,8 @@ 'use strict';

/**
* If the socket is deemed already closed
* @private
*/
this._destroyed = false;
if (this.options.secure) {

@@ -156,4 +162,3 @@ this._secureMode = true;

this._connectionTimeout = setTimeout((function() {
this.emit('error', this._formatError('Connection timeout', 'ETIMEDOUT'));
this.close();
this._onError('Connection timeout', 'ETIMEDOUT');
}).bind(this), this.options.connectionTimeout || 60 * 1000);

@@ -291,2 +296,8 @@

if (this._destroyed) {
// Connection was established after we already had canceled it
this.close();
return;
}
this.stage = 'connected';

@@ -304,4 +315,3 @@

if (this._socket && !this._destroyed && this._currentAction === this._actionGreeting) {
this.emit('error', this._formatError('Greeting never received', 'ETIMEDOUT'));
this.close();
this._onError('Greeting never received', 'ETIMEDOUT');
}

@@ -355,2 +365,9 @@ }).bind(this), this.options.greetingTimeout || 10000);

if (this._destroyed) {
// just ignore, already closed
// this might happen when a socket is canceled because of reached timeout
// but the socket timeout error itself receives only after
return;
}
this.emit('error', this._formatError(err, type, data));

@@ -357,0 +374,0 @@ this.close();

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