smtp-connection
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
# Changelog | ||
## v2.0.0-beta.1 2016-01-01 | ||
## v2.0.0-beta.2 2016-01-03 | ||
* Updated logging. Log information about transmitted message size in bytes | ||
## v2.0.0-beta.1 2016-01-03 | ||
* Re-added `debug` option. If set to true, then logs SMTP traffic, otherwise only transaction events | ||
* Pass streamed message content to the logger | ||
## v2.0.0-beta.0 2016-01-01 | ||
## v2.0.0-beta.0 2016-01-02 | ||
@@ -10,0 +14,0 @@ * Replaced jshint with eslint |
@@ -20,2 +20,4 @@ 'use strict'; | ||
this.inByteCount = 0; | ||
this.outByteCount = 0; | ||
this.lastByte = false; | ||
@@ -44,2 +46,4 @@ | ||
this.inByteCount += chunk.length; | ||
for (i = 0, len = chunk.length; i < len; i++) { | ||
@@ -83,4 +87,6 @@ if (chunk[i] === 0x2E) { // . | ||
this.outByteCount += chunklen; | ||
this.push(Buffer.concat(chunks, chunklen)); | ||
} else { | ||
this.outByteCount += chunk.length; | ||
this.push(chunk); | ||
@@ -105,4 +111,5 @@ } | ||
} | ||
this.outByteCount += buf.length; | ||
this.push(buf); | ||
done(); | ||
}; |
@@ -531,3 +531,3 @@ 'use strict'; | ||
if (this.options.debug) { | ||
this.logger.debug('S: %s', str.trim()); | ||
this.logger.debug('S: %s', str.replace(/\r?\n$/, '')); | ||
} | ||
@@ -566,3 +566,3 @@ | ||
if (this.options.debug) { | ||
this.logger.debug('C: %s', (str || '').toString().trim()); | ||
this.logger.debug('C: %s', (str || '').toString().replace(/\r?\n$/, '')); | ||
} | ||
@@ -632,3 +632,3 @@ | ||
while ((chunk = logStream.read())) { | ||
this.logger.debug('C: %s', chunk.toString('binary').trim()); | ||
this.logger.debug('C: %s', chunk.toString('binary').replace(/\r?\n$/, '')); | ||
} | ||
@@ -639,2 +639,6 @@ }.bind(this)); | ||
dataStream.once('end', function () { | ||
this.logger.info('C: <%s bytes encoded mime message (source size %s bytes)>', dataStream.outByteCount, dataStream.inByteCount); | ||
}.bind(this)); | ||
return dataStream; | ||
@@ -641,0 +645,0 @@ }; |
{ | ||
"name": "smtp-connection", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "Connect to SMTP servers", | ||
@@ -5,0 +5,0 @@ "main": "lib/smtp-connection.js", |
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
48493
1087