email-forward-parser 1.5.11 → 1.6.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/README.md +2 -1
- package/lib/parser.js +8 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ _👋 You use this library and you want to be listed there? [Contact us](https:/
|
|
|
24
24
|
## Features
|
|
25
25
|
|
|
26
26
|
This library is used at [Crisp](https://crisp.chat/) everyday with around 1 million inbound emails.
|
|
27
|
-
* Supported clients: Apple Mail, Gmail, Outlook Live / 365, Outlook 2013, Outlook 2019, New Outlook 2019, Yahoo Mail, Thunderbird, Missive, HubSpot, IONOS by 1 & 1
|
|
27
|
+
* Supported clients: Apple Mail, Gmail, Outlook Live / 365, Outlook 2013, Outlook 2019, New Outlook 2019, Yahoo Mail, Thunderbird, Missive, HubSpot, IONOS by 1 & 1, MailMate
|
|
28
28
|
* Supported locales: Croatian, Czech, Danish, Dutch, English, French, Finnish, German, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Slovak, Spanish, Swedish, Turkish, Ukrainian
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
@@ -98,6 +98,7 @@ Thunderbird | Yes | Yes | No | Yes | Yes | Yes | --
|
|
|
98
98
|
Missive | Yes | Yes | No | No | Yes | No | --
|
|
99
99
|
HubSpot | Yes | Yes | Yes | Yes | Yes | Yes | --
|
|
100
100
|
IONOS by 1 & 1 | ? | Yes | ? | ? | Yes | ? | --
|
|
101
|
+
MailMate | Yes | Yes | ? | ? | Yes | ? | --
|
|
101
102
|
|
|
102
103
|
## Contributing
|
|
103
104
|
|
package/lib/parser.js
CHANGED
|
@@ -16,7 +16,8 @@ var LINE_REGEXES = [
|
|
|
16
16
|
"original_subject_lax",
|
|
17
17
|
"original_to",
|
|
18
18
|
"original_reply_to",
|
|
19
|
-
"original_cc"
|
|
19
|
+
"original_cc",
|
|
20
|
+
"original_date"
|
|
20
21
|
];
|
|
21
22
|
|
|
22
23
|
var REGEXES = {
|
|
@@ -44,7 +45,7 @@ var REGEXES = {
|
|
|
44
45
|
/^VL:(.*)/m, // New Outlook 2019 (fi)
|
|
45
46
|
/^Videresend:(.*)/m, // New Outlook 2019 (no)
|
|
46
47
|
/^İLT:(.*)/m, // New Outlook 2019 (tr)
|
|
47
|
-
/^Fwd:(.*)/m // Gmail (all locales), Thunderbird (all locales), Missive (en)
|
|
48
|
+
/^Fwd:(.*)/m // Gmail (all locales), Thunderbird (all locales), Missive (en), MailMate (en)
|
|
48
49
|
],
|
|
49
50
|
|
|
50
51
|
separator : [
|
|
@@ -72,6 +73,7 @@ var REGEXES = {
|
|
|
72
73
|
/^>?\s*Початок листа, що пересилається\s?:/m, // Apple Mail (uk)
|
|
73
74
|
/^\s*-{8,10}\s*Forwarded message\s*-{8,10}\s*/m, // Gmail (all locales), Missive (en), HubSpot (en)
|
|
74
75
|
/^\s*_{32}\s*$/m, // Outlook Live / 365 (all locales)
|
|
76
|
+
/^\s?Forwarded message:/m, // Mailmate
|
|
75
77
|
/^\s?Dne\s?.+\,\s?.+\s*[\[|<].+[\]|>]\s?napsal\(a\)\s?:/m, // Outlook 2019 (cz)
|
|
76
78
|
/^\s?D.\s?.+\s?skrev\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (da)
|
|
77
79
|
/^\s?Am\s?.+\s?schrieb\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (de)
|
|
@@ -634,7 +636,8 @@ class Parser {
|
|
|
634
636
|
|
|
635
637
|
// First method: extract the text after the Subject part \
|
|
636
638
|
// (Outlook Live / 365) or after the Cc, To or Reply-To part \
|
|
637
|
-
// (Apple Mail, Gmail). A new line must be
|
|
639
|
+
// (Apple Mail, Gmail) or Date part (MailMate). A new line must be \
|
|
640
|
+
// present.
|
|
638
641
|
// Notice: use 'line' regexes that will capture not only the Subject, Cc, \
|
|
639
642
|
// To or Reply-To part, but also the line itself, as we may need it \
|
|
640
643
|
// to build the original body back (in case of nested emails)
|
|
@@ -642,7 +645,8 @@ class Parser {
|
|
|
642
645
|
this.__regexes.original_subject_line,
|
|
643
646
|
this.__regexes.original_cc_line,
|
|
644
647
|
this.__regexes.original_to_line,
|
|
645
|
-
this.__regexes.original_reply_to_line
|
|
648
|
+
this.__regexes.original_reply_to_line,
|
|
649
|
+
this.__regexes.original_date_line
|
|
646
650
|
];
|
|
647
651
|
|
|
648
652
|
for (var _i = 0; _i < _regexes.length; _i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "email-forward-parser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Parses forwarded emails and extract content",
|
|
5
5
|
"author": "Eliott Vincent <eliott@crisp.chat>",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"nodeunit-x": "0.15.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"re2": "1.
|
|
26
|
+
"re2": "1.21.4"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"parser",
|