mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-07 16:38:17 +08:00
do not add extra newline to messages with text body for multipart
This commit is contained in:
parent
9534594a7e
commit
40b36fed53
2 changed files with 5 additions and 5 deletions
|
@ -80,12 +80,13 @@ class Indexer {
|
|||
next();
|
||||
};
|
||||
|
||||
root = false;
|
||||
|
||||
if (node.size || node.attachmentId) {
|
||||
append(false, true); // force newline
|
||||
if (!root) {
|
||||
append(false, true); // force newline
|
||||
}
|
||||
size += node.size;
|
||||
}
|
||||
root = false;
|
||||
|
||||
if (node.boundary) {
|
||||
append('--' + node.boundary);
|
||||
|
|
|
@ -37,7 +37,7 @@ class LengthLimiter extends Transform {
|
|||
if (this.byteCounter < this.startFrom) {
|
||||
// split the chunk and ignore the first part
|
||||
chunk = chunk.slice(this.startFrom - this.byteCounter);
|
||||
this.byteCounter += (this.startFrom - this.byteCounter);
|
||||
this.byteCounter += this.startFrom - this.byteCounter;
|
||||
}
|
||||
|
||||
// can emit full chunk
|
||||
|
@ -69,7 +69,6 @@ class LengthLimiter extends Transform {
|
|||
}
|
||||
done();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = LengthLimiter;
|
||||
|
|
Loading…
Reference in a new issue