simplesmtp
Advanced tools
Comparing version 0.1.18 to 0.1.19
@@ -97,2 +97,8 @@ // TODO: | ||
/** | ||
* Store incomplete messages coming from the server | ||
* @private | ||
*/ | ||
this._remainder = ""; | ||
/** | ||
* If set to true, then this object is no longer active | ||
@@ -209,11 +215,20 @@ * @private | ||
SMTPClient.prototype._onData = function(chunk){ | ||
if(this._ignoreData){ | ||
var str; | ||
if(this._ignoreData || !chunk || !chunk.length){ | ||
return; | ||
} | ||
var str = chunk.toString().trim(); | ||
// Wait until end of line | ||
if(chunk[chunk.length-1] != 0x0A){ | ||
this._remainder += chunk.toString(); | ||
return; | ||
}else{ | ||
str = (this._remainder + chunk.toString()).trim(); | ||
this._remainder = ""; | ||
} | ||
if(this.options.debug){ | ||
console.log("SERVER"+(this.options.instanceId?" "+ | ||
this.options.instanceId:"")+":\n└──"+str.replace(/\n/g,"\n ")); | ||
this.options.instanceId:"")+":\n└──"+str.replace(/\r?\n/g,"\n ")); | ||
} | ||
@@ -220,0 +235,0 @@ |
{ | ||
"name": "simplesmtp", | ||
"description": "Simple SMTP server module to create custom SMTP servers", | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"author" : "Andris Reinman", | ||
@@ -6,0 +6,0 @@ "maintainers":[ |
Sorry, the diff of this file is not supported yet
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
104854
2525
1