mailparser 3.6.2 → 3.6.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/lib/mail-parser.js +12 -5
- package/package.json +4 -4
package/lib/mail-parser.js
CHANGED
|
@@ -273,8 +273,13 @@ class MailParser extends Transform {
|
|
|
273
273
|
|
|
274
274
|
cleanup(done) {
|
|
275
275
|
let finish = () => {
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
try {
|
|
277
|
+
let t = this.getTextContent();
|
|
278
|
+
this.push(t);
|
|
279
|
+
} catch (err) {
|
|
280
|
+
return this.emit('error', err);
|
|
281
|
+
}
|
|
282
|
+
|
|
278
283
|
done();
|
|
279
284
|
};
|
|
280
285
|
|
|
@@ -749,9 +754,11 @@ class MailParser extends Transform {
|
|
|
749
754
|
}
|
|
750
755
|
}
|
|
751
756
|
alternative = alternative || node.contentType === 'multipart/alternative';
|
|
752
|
-
node.children
|
|
753
|
-
|
|
754
|
-
|
|
757
|
+
if (node.children) {
|
|
758
|
+
node.children.forEach(subNode => {
|
|
759
|
+
processNode(alternative, level + 1, subNode);
|
|
760
|
+
});
|
|
761
|
+
}
|
|
755
762
|
};
|
|
756
763
|
|
|
757
764
|
processNode(false, 0, this.tree);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailparser",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "Parse e-mails",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"encoding-japanese": "2.0.0",
|
|
20
20
|
"he": "1.2.0",
|
|
21
|
-
"html-to-text": "9.0.
|
|
21
|
+
"html-to-text": "9.0.3",
|
|
22
22
|
"iconv-lite": "0.6.3",
|
|
23
23
|
"libmime": "5.2.0",
|
|
24
24
|
"linkify-it": "4.0.1",
|
|
25
25
|
"mailsplit": "5.4.0",
|
|
26
26
|
"nodemailer": "6.8.0",
|
|
27
|
-
"tlds": "1.
|
|
27
|
+
"tlds": "1.236.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"ajv": "8.11.2",
|
|
31
|
-
"eslint": "8.
|
|
31
|
+
"eslint": "8.30.0",
|
|
32
32
|
"eslint-config-nodemailer": "1.2.0",
|
|
33
33
|
"eslint-config-prettier": "8.5.0",
|
|
34
34
|
"grunt": "1.5.3",
|