@bobfrankston/rmfmail 1.2.253 → 1.2.254

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.
@@ -2531,11 +2531,12 @@ function wrapWithAttachments(commonHeaders, inner, attachments, newBoundary) {
2531
2531
  ` + inner.body;
2532
2532
  }
2533
2533
  const mixedBoundary = newBoundary();
2534
+ const endCRLF = (s) => s.endsWith("\r\n") ? s : s + "\r\n";
2534
2535
  const parts = [
2535
2536
  `--${mixedBoundary}\r
2536
2537
  ` + inner.headers.join("\r\n") + `\r
2537
2538
  \r
2538
- ` + inner.body
2539
+ ` + endCRLF(inner.body)
2539
2540
  ];
2540
2541
  for (const att of attachments) {
2541
2542
  const filename = (att.filename || "attachment").replace(/[\r\n"]/g, "_");