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 1.2.0 to 1.3.0

4

CHANGELOG.md
# Changelog
## v1.3.0 2015-03-09
* Added partial support for LMTP protocol. Works only with single recipient (does not support multiple responses for DATA command)
## v1.2.0 2015-03-09

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

12

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

@@ -26,11 +26,11 @@ "main": "src/smtp-connection.js",

"devDependencies": {
"chai": "^2.1.1",
"chai": "^3.0.0",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-jshint": "^0.11.2",
"grunt-mocha-test": "^0.12.7",
"mocha": "^2.2.1",
"smtp-server": "^1.0.2",
"sinon": "^1.13.0",
"mocha": "^2.2.5",
"smtp-server": "^1.4.0",
"sinon": "^1.15.4",
"xoauth2": "^1.0.0"
}
}

@@ -40,2 +40,3 @@ # smtp-connection

* **options.debug** if true, the connection emits all traffic between client and server as 'log' events
* **options.lmtp** if true, uses LMTP instead of SMTP to talk to the server. Partial support, does not work well with multiple recipients
* **options.authMethod** defines preferred authentication method, e.g. 'PLAIN'

@@ -42,0 +43,0 @@ * **options.tls** defines additional options to be passed to the socket constructor, e.g. *{rejectUnauthorized: true}*

@@ -29,2 +29,3 @@ 'use strict';

* * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 1 hour)
* * **lmtp** - if true, uses LMTP instead of SMTP protocol
* * **debug** - if true, emits 'log' events with all traffic between client and server

@@ -611,7 +612,27 @@ * * **tls** - options for createCredentials

this._currentAction = this._actionEHLO;
this._sendCommand('EHLO ' + this.options.name);
if (this.options.lmtp) {
this._currentAction = this._actionLHLO;
this._sendCommand('LHLO ' + this.options.name);
} else {
this._currentAction = this._actionEHLO;
this._sendCommand('EHLO ' + this.options.name);
}
};
/**
* Handles server response for LHLO command. If it yielded in
* error, emit 'error', otherwise treat this as an EHLO response
*
* @param {String} str Message from the server
*/
SMTPConnection.prototype._actionLHLO = function(str) {
if (str.charAt(0) !== '2') {
this._onError(new Error('Invalid response for LHLO:\n' + str), 'EPROTOCOL', str);
return;
}
this._actionEHLO(str);
};
/**
* Handles server response for EHLO command. If it yielded in

@@ -981,2 +1002,2 @@ * error, try HELO instead, otherwise initiate TLS negotiation

return defaultHostname;
};
};
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