smtp-server
Advanced tools
Comparing version 1.15.0 to 1.16.0
# Changelog | ||
## v1.16.0 2016-10-17 | ||
* Added new method `connect` to pass already established sockets to the server | ||
## v1.15.0 2016-09-23 | ||
@@ -4,0 +8,0 @@ |
@@ -83,9 +83,3 @@ 'use strict'; | ||
// setup server listener and connection handler | ||
this.server = (this.options.secure ? tls : net).createServer(this.options, function (socket) { | ||
var connection = new SMTPConnection(this, socket); | ||
this.connections.add(connection); | ||
connection.on('error', this._onError.bind(this)); | ||
connection.on('connect', this._onClientConnect.bind(this)); | ||
connection.init(); | ||
}.bind(this)); | ||
this.server = (this.options.secure ? tls : net).createServer(this.options, this.connect.bind(this)); | ||
@@ -99,2 +93,10 @@ // ensure _sharedCreds, fixes an issue in node v4+ where STARTTLS fails because _sharedCreds does not exist | ||
SMTPServer.prototype.connect = function (socket) { | ||
var connection = new SMTPConnection(this, socket); | ||
this.connections.add(connection); | ||
connection.on('error', this._onError.bind(this)); | ||
connection.on('connect', this._onClientConnect.bind(this)); | ||
connection.init(); | ||
}; | ||
/** | ||
@@ -101,0 +103,0 @@ * Start listening on selected port and interface |
{ | ||
"name": "smtp-server", | ||
"version": "1.15.0", | ||
"version": "1.16.0", | ||
"description": "Create custom SMTP servers on the fly", | ||
@@ -22,3 +22,3 @@ "main": "lib/smtp-server.js", | ||
"mocha": "^3.0.2", | ||
"smtp-connection": "^2.12.0" | ||
"smtp-connection": "^2.12.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "engines": { |
@@ -468,4 +468,8 @@ # smtp-server | ||
## Built with *smtp-server* | ||
[![Crisp.im](https://avatars0.githubusercontent.com/u/16270189?v=3&s=32)](http://crisp.im/) **[Crisp.im](http://crisp.im/)** | ||
## License | ||
**MIT** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
145875
3047
475