arn-rawmime 0.1.1 → 0.1.3
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.d.ts +1 -0
- package/src/rawmimeBuilder.js +6 -2
package/package.json
CHANGED
package/src/rawmimeBuilder.d.ts
CHANGED
package/src/rawmimeBuilder.js
CHANGED
|
@@ -475,8 +475,12 @@ class MimeMessage {
|
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
// Default encoding is now 'quoted-printable'
|
|
478
|
-
addText({ data, encoding = "quoted-printable", charset = "UTF-8" }) {
|
|
479
|
-
|
|
478
|
+
addText({ data, encoding = "quoted-printable", charset = "UTF-8", autoMinify = false }) {
|
|
479
|
+
let finalData = data;
|
|
480
|
+
if (autoMinify && typeof finalData === "string") {
|
|
481
|
+
finalData = finalData.replace(/\s+/g, " ").trim();
|
|
482
|
+
}
|
|
483
|
+
this._addBodyPart(finalData, "text/plain", encoding, charset);
|
|
480
484
|
}
|
|
481
485
|
|
|
482
486
|
/**
|