arn-rawmime 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/rawmimeBuilder.js +6 -6
package/package.json
CHANGED
package/src/rawmimeBuilder.js
CHANGED
|
@@ -651,7 +651,7 @@ class MimeMessage {
|
|
|
651
651
|
const numAttachments = this.attachments.length;
|
|
652
652
|
const numBodyParts = this.bodyParts.length;
|
|
653
653
|
|
|
654
|
-
// NOTE:
|
|
654
|
+
// NOTE: Single \r\n after content data to match standard email client output
|
|
655
655
|
|
|
656
656
|
// CASE 1: No Attachments (Multipart/Alternative)
|
|
657
657
|
if (numAttachments === 0) {
|
|
@@ -663,7 +663,7 @@ class MimeMessage {
|
|
|
663
663
|
body += `--${boundary}\r\n`;
|
|
664
664
|
body += `Content-Type: ${part.contentType}; charset=${part.charset}\r\n`;
|
|
665
665
|
body += `Content-Transfer-Encoding: ${part.encoding}\r\n\r\n`;
|
|
666
|
-
body += part.data + "\r\n
|
|
666
|
+
body += part.data + "\r\n";
|
|
667
667
|
}
|
|
668
668
|
body += `--${boundary}--`;
|
|
669
669
|
} else if (numBodyParts === 1) {
|
|
@@ -691,15 +691,15 @@ class MimeMessage {
|
|
|
691
691
|
body += `--${altBoundary}\r\n`;
|
|
692
692
|
body += `Content-Type: ${part.contentType}; charset=${part.charset}\r\n`;
|
|
693
693
|
body += `Content-Transfer-Encoding: ${part.encoding}\r\n\r\n`;
|
|
694
|
-
body += part.data + "\r\n
|
|
694
|
+
body += part.data + "\r\n";
|
|
695
695
|
}
|
|
696
|
-
body += `--${altBoundary}--\r\n
|
|
696
|
+
body += `--${altBoundary}--\r\n`;
|
|
697
697
|
} else {
|
|
698
698
|
const part = this.bodyParts[0];
|
|
699
699
|
body += `--${mixedBoundary}\r\n`;
|
|
700
700
|
body += `Content-Type: ${part.contentType}; charset=${part.charset}\r\n`;
|
|
701
701
|
body += `Content-Transfer-Encoding: ${part.encoding}\r\n\r\n`;
|
|
702
|
-
body += part.data + "\r\n
|
|
702
|
+
body += part.data + "\r\n";
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
|
|
@@ -711,7 +711,7 @@ class MimeMessage {
|
|
|
711
711
|
body += `Content-Transfer-Encoding: ${att.encoding}\r\n`;
|
|
712
712
|
body += `Content-ID: ${att.headers["Content-ID"]}\r\n`;
|
|
713
713
|
body += `X-Attachment-Id: ${att.headers["X-Attachment-Id"]}\r\n\r\n`;
|
|
714
|
-
body += att.data + "\r\n
|
|
714
|
+
body += att.data + "\r\n";
|
|
715
715
|
}
|
|
716
716
|
body += `--${mixedBoundary}--`;
|
|
717
717
|
}
|