arn-rawmime 0.1.0 → 0.1.1
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 +7 -4
package/package.json
CHANGED
package/src/rawmimeBuilder.js
CHANGED
|
@@ -628,11 +628,14 @@ class MimeMessage {
|
|
|
628
628
|
// Wait for Attachments AND Markdown Processing
|
|
629
629
|
await Promise.all([...this.attachmentPromises, ...this.processingPromises]);
|
|
630
630
|
|
|
631
|
-
if (!this.headers.some((h) => h.name.toLowerCase() === "mime-version"))
|
|
631
|
+
if (!this.headers.some((h) => h.name.toLowerCase() === "mime-version") && !this.removedHeaders.has("mime-version"))
|
|
632
632
|
this.headers.unshift({ name: "MIME-Version", value: "1.0" });
|
|
633
|
-
if (!this.headers.some((h) => h.name.toLowerCase() === "date")
|
|
634
|
-
|
|
635
|
-
if (!this.headers.some((h) => h.name.toLowerCase() === "
|
|
633
|
+
if (!this.headers.some((h) => h.name.toLowerCase() === "date") && !this.removedHeaders.has("date"))
|
|
634
|
+
this.setDate();
|
|
635
|
+
if (!this.headers.some((h) => h.name.toLowerCase() === "message-id") && !this.removedHeaders.has("message-id"))
|
|
636
|
+
this.messageId();
|
|
637
|
+
if (!this.headers.some((h) => h.name.toLowerCase() === "subject") && !this.removedHeaders.has("subject"))
|
|
638
|
+
this.setSubject("");
|
|
636
639
|
|
|
637
640
|
// Sort Body: Text parts must come before HTML parts, keeping stable addition order
|
|
638
641
|
const texts = this.bodyParts.filter((p) => p.contentType === "text/plain");
|