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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arn-rawmime",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A lightweight, dependency-free raw MIME email builder with DKIM support.",
5
5
  "author": "ARNDESK",
6
6
  "type": "module",
@@ -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")) this.setDate();
634
- if (!this.headers.some((h) => h.name.toLowerCase() === "message-id")) this.messageId();
635
- if (!this.headers.some((h) => h.name.toLowerCase() === "subject")) this.setSubject("");
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");