email-forward-parser 1.0.17 → 1.0.18
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 -2
- package/lib/parser.js +67 -47
- package/package.json +1 -1
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, Outlook 2013, Outlook 2019, New Outlook 2019, Yahoo Mail, Thunderbird, Missive
|
|
27
|
+
* Supported clients: Apple Mail, Gmail, Outlook Live / 365, Outlook 2013, Outlook 2019, New Outlook 2019, Yahoo Mail, Thunderbird, Missive
|
|
28
28
|
* Supported locales: Croatian, Czech, Danish, Dutch, English, French, Finnish, German, Hungarian, Italian, Norwegian, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Slovak, Spanish, Swedish, Turkish, Ukrainian
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
@@ -89,7 +89,7 @@ Client | Detectable via subject | Detectable via separator | Subject localized |
|
|
|
89
89
|
--- | --- | --- | --- | --- | --- | --- | ---
|
|
90
90
|
Apple Mail | Yes | Yes | Yes | Yes | Yes | Yes | --
|
|
91
91
|
Gmail | Yes | Yes | No | No | Yes | Only some parts | --
|
|
92
|
-
Outlook Live | Yes | Yes | Yes | No | Yes | No | --
|
|
92
|
+
Outlook Live / 365 | Yes | Yes | Yes | No | Yes | No | --
|
|
93
93
|
Outlook 2013 | Yes | No | ? | -- | ? | ? | --
|
|
94
94
|
Outlook 2019 | Yes | Yes | No | Yes | No | Yes | The From and Date parts (only original information available) are embedded in the separator, rather than the body itself
|
|
95
95
|
New Outlook 2019 | Yes | No | Yes | -- | Yes | Yes | --
|
package/lib/parser.js
CHANGED
|
@@ -7,7 +7,7 @@ var { loopRegexes, trimString } = require("./utils");
|
|
|
7
7
|
|
|
8
8
|
var MAILBOXES_SEPARATORS = [
|
|
9
9
|
",", // Apple Mail, Gmail, New Outlook 2019, Thunderbird
|
|
10
|
-
";" // Outlook Live, Yahoo Mail
|
|
10
|
+
";" // Outlook Live / 365, Yahoo Mail
|
|
11
11
|
];
|
|
12
12
|
|
|
13
13
|
var REGEXES = {
|
|
@@ -18,18 +18,18 @@ var REGEXES = {
|
|
|
18
18
|
byte_order_mark : /[\uFEFF]/gm, // Outlook 2019
|
|
19
19
|
|
|
20
20
|
subject : [
|
|
21
|
-
/^Fw:(.*)/m, // Outlook Live (cs, en, hr, hu, sk), Yahoo Mail (all locales)
|
|
22
|
-
/^VS:(.*)/m, // Outlook Live (da), New Outlook 2019 (da)
|
|
23
|
-
/^WG:(.*)/m, // Outlook Live (de), New Outlook 2019 (de)
|
|
24
|
-
/^RV:(.*)/m, // Outlook Live (es), New Outlook 2019 (es)
|
|
25
|
-
/^TR:(.*)/m, // Outlook Live (fr), New Outlook 2019 (fr)
|
|
26
|
-
/^I:(.*)/m, // Outlook Live (it), New Outlook 2019 (it)
|
|
27
|
-
/^FW:(.*)/m, // Outlook Live (nl, pt), New Outlook 2019 (cs, en, hu, nl, pt, ru, sk), Outlook 2019 (all locales)
|
|
28
|
-
/^Vs:(.*)/m, // Outlook Live (no)
|
|
29
|
-
/^PD:(.*)/m, // Outlook Live (pl), New Outlook 2019 (pl)
|
|
30
|
-
/^ENC:(.*)/m, // Outlook Live (pt-br), New Outlook 2019 (pt-br)
|
|
31
|
-
/^Redir.:(.*)/m, // Outlook Live (ro)
|
|
32
|
-
/^VB:(.*)/m, // Outlook Live (sv), New Outlook 2019 (sv)
|
|
21
|
+
/^Fw:(.*)/m, // Outlook Live / 365 (cs, en, hr, hu, sk), Yahoo Mail (all locales)
|
|
22
|
+
/^VS:(.*)/m, // Outlook Live / 365 (da), New Outlook 2019 (da)
|
|
23
|
+
/^WG:(.*)/m, // Outlook Live / 365 (de), New Outlook 2019 (de)
|
|
24
|
+
/^RV:(.*)/m, // Outlook Live / 365 (es), New Outlook 2019 (es)
|
|
25
|
+
/^TR:(.*)/m, // Outlook Live / 365 (fr), New Outlook 2019 (fr)
|
|
26
|
+
/^I:(.*)/m, // Outlook Live / 365 (it), New Outlook 2019 (it)
|
|
27
|
+
/^FW:(.*)/m, // Outlook Live / 365 (nl, pt), New Outlook 2019 (cs, en, hu, nl, pt, ru, sk), Outlook 2019 (all locales)
|
|
28
|
+
/^Vs:(.*)/m, // Outlook Live / 365 (no)
|
|
29
|
+
/^PD:(.*)/m, // Outlook Live / 365 (pl), New Outlook 2019 (pl)
|
|
30
|
+
/^ENC:(.*)/m, // Outlook Live / 365 (pt-br), New Outlook 2019 (pt-br)
|
|
31
|
+
/^Redir.:(.*)/m, // Outlook Live / 365 (ro)
|
|
32
|
+
/^VB:(.*)/m, // Outlook Live / 365 (sv), New Outlook 2019 (sv)
|
|
33
33
|
/^VL:(.*)/m, // New Outlook 2019 (fi)
|
|
34
34
|
/^Videresend:(.*)/m, // New Outlook 2019 (no)
|
|
35
35
|
/^İLT:(.*)/m, // New Outlook 2019 (tr)
|
|
@@ -60,24 +60,24 @@ var REGEXES = {
|
|
|
60
60
|
/^>?\s*İleti başlangıcı\s?:/m, // Apple Mail (tr)
|
|
61
61
|
/^>?\s*Початок листа, що пересилається\s?:/m, // Apple Mail (uk)
|
|
62
62
|
/^\s*-{8,10}\s*Forwarded message\s*-{8,10}\s*/m, // Gmail (all locales), Missive (en)
|
|
63
|
-
/^\s*_{32}\s*$/m, // Outlook Live (all locales)
|
|
64
|
-
/^\s?Dne\s
|
|
65
|
-
/^\s?D.\s
|
|
66
|
-
/^\s?Am\s
|
|
67
|
-
/^\s?On\s
|
|
68
|
-
/^\s?El\s
|
|
69
|
-
/^\s?Le\s
|
|
70
|
-
/^\s
|
|
71
|
-
/^\s
|
|
72
|
-
/^\s?Il giorno\s
|
|
73
|
-
/^\s?Op\s
|
|
74
|
-
/^\s
|
|
75
|
-
/^\s?Dnia\s
|
|
76
|
-
/^\s?Em\s
|
|
77
|
-
/^\s
|
|
78
|
-
/^\s
|
|
79
|
-
/^\s?Den\s
|
|
80
|
-
/^\s?\"
|
|
63
|
+
/^\s*_{32}\s*$/m, // Outlook Live / 365 (all locales)
|
|
64
|
+
/^\s?Dne\s?.+\,\s?.+\s*[\[|<].+[\]|>]\s?napsal\(a\)\s?:/m, // Outlook 2019 (cz)
|
|
65
|
+
/^\s?D.\s?.+\s?skrev\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (da)
|
|
66
|
+
/^\s?Am\s?.+\s?schrieb\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (de)
|
|
67
|
+
/^\s?On\s?.+\,\s?\".+\"\s*[\[|<].+[\]|>]\s?wrote\s?:/m, // Outlook 2019 (en)
|
|
68
|
+
/^\s?El\s?.+\,\s?\".+\"\s*[\[|<].+[\]|>]\s?escribió\s?:/m, // Outlook 2019 (es)
|
|
69
|
+
/^\s?Le\s?.+\,\s?«.+»\s*[\[|<].+[\]|>]\s?a écrit\s?:/m, // Outlook 2019 (fr)
|
|
70
|
+
/^\s?.+\s*[\[|<].+[\]|>]\s?kirjoitti\s?.+\s?:/m, // Outlook 2019 (fi)
|
|
71
|
+
/^\s?.+\s?időpontban\s?.+\s*[\[|<|(].+[\]|>|)]\s?ezt írta\s?:/m, // Outlook 2019 (hu)
|
|
72
|
+
/^\s?Il giorno\s?.+\s?\".+\"\s*[\[|<].+[\]|>]\s?ha scritto\s?:/m, // Outlook 2019 (it)
|
|
73
|
+
/^\s?Op\s?.+\s?heeft\s?.+\s*[\[|<].+[\]|>]\s?geschreven\s?:/m, // Outlook 2019 (nl)
|
|
74
|
+
/^\s?.+\s*[\[|<].+[\]|>]\s?skrev følgende den\s?.+\s?:/m, // Outlook 2019 (no)
|
|
75
|
+
/^\s?Dnia\s?.+\s?„.+”\s*[\[|<].+[\]|>]\s?napisał\s?:/m, // Outlook 2019 (pl)
|
|
76
|
+
/^\s?Em\s?.+\,\s?\".+\"\s*[\[|<].+[\]|>]\s?escreveu\s?:/m, // Outlook 2019 (pt)
|
|
77
|
+
/^\s?.+\s?пользователь\s?\".+\"\s*[\[|<].+[\]|>]\s?написал\s?:/m, // Outlook 2019 (ru)
|
|
78
|
+
/^\s?.+\s?používateľ\s?.+\s*\([\[|<].+[\]|>]\)\s?napísal\s?:/m, // Outlook 2019 (sk)
|
|
79
|
+
/^\s?Den\s?.+\s?skrev\s?\".+\"\s*[\[|<].+[\]|>]\s?följande\s?:/m, // Outlook 2019 (sv)
|
|
80
|
+
/^\s?\".+\"\s*[\[|<].+[\]|>]\,\s?.+\s?tarihinde şunu yazdı\s?:/m, // Outlook 2019 (tr)
|
|
81
81
|
/\s*-{5,8} Přeposlaná zpráva -{5,8}\s*/m, // Yahoo Mail (cs), Thunderbird (cs)
|
|
82
82
|
/\s*-{5,8} Videresendt meddelelse -{5,8}\s*/m, // Yahoo Mail (da), Thunderbird (da)
|
|
83
83
|
/\s*-{5,8} Weitergeleitete Nachricht -{5,8}\s*/m, // Yahoo Mail (de), Thunderbird (de)
|
|
@@ -109,8 +109,28 @@ var REGEXES = {
|
|
|
109
109
|
/\s*-{8} Переслане повідомлення -{8}\s*/m // Thunderbird (uk)
|
|
110
110
|
],
|
|
111
111
|
|
|
112
|
+
separator_with_information : [
|
|
113
|
+
/^\s?Dne\s?(?<date>.+)\,\s?(?<from_name>.+)\s*[\[|<](?<from_address>.+)[\]|>]\s?napsal\(a\)\s?:/m, // Outlook 2019 (cz)
|
|
114
|
+
/^\s?D.\s?(?<date>.+)\s?skrev\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?:/m, // Outlook 2019 (da)
|
|
115
|
+
/^\s?Am\s?(?<date>.+)\s?schrieb\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?:/m, // Outlook 2019 (de)
|
|
116
|
+
/^\s?On\s?(?<date>.+)\,\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?wrote\s?:/m, // Outlook 2019 (en)
|
|
117
|
+
/^\s?El\s?(?<date>.+)\,\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?escribió\s?:/m, // Outlook 2019 (es)
|
|
118
|
+
/^\s?Le\s?(?<date>.+)\,\s?«(?<from_name>.+)»\s*[\[|<](?<from_address>.+)[\]|>]\s?a écrit\s?:/m, // Outlook 2019 (fr)
|
|
119
|
+
/^\s?(?<from_name>.+)\s*[\[|<](?<from_address>.+)[\]|>]\s?kirjoitti\s?(?<date>.+)\s?:/m, // Outlook 2019 (fi)
|
|
120
|
+
/^\s?(?<date>.+)\s?időpontban\s?(?<from_name>.+)\s*[\[|<|(](?<from_address>.+)[\]|>|)]\s?ezt írta\s?:/m, // Outlook 2019 (hu)
|
|
121
|
+
/^\s?Il giorno\s?(?<date>.+)\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?ha scritto\s?:/m, // Outlook 2019 (it)
|
|
122
|
+
/^\s?Op\s?(?<date>.+)\s?heeft\s?(?<from_name>.+)\s*[\[|<](?<from_address>.+)[\]|>]\s?geschreven\s?:/m, // Outlook 2019 (nl)
|
|
123
|
+
/^\s?(?<from_name>.+)\s*[\[|<](?<from_address>.+)[\]|>]\s?skrev følgende den\s?(?<date>.+)\s?:/m, // Outlook 2019 (no)
|
|
124
|
+
/^\s?Dnia\s?(?<date>.+)\s?„(?<from_name>.+)”\s*[\[|<](?<from_address>.+)[\]|>]\s?napisał\s?:/m, // Outlook 2019 (pl)
|
|
125
|
+
/^\s?Em\s?(?<date>.+)\,\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?escreveu\s?:/m, // Outlook 2019 (pt)
|
|
126
|
+
/^\s?(?<date>.+)\s?пользователь\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?написал\s?:/m, // Outlook 2019 (ru)
|
|
127
|
+
/^\s?(?<date>.+)\s?používateľ\s?(?<from_name>.+)\s*\([\[|<](?<from_address>.+)[\]|>]\)\s?napísal\s?:/m, // Outlook 2019 (sk)
|
|
128
|
+
/^\s?Den\s?(?<date>.+)\s?skrev\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?följande\s?:/m, // Outlook 2019 (sv)
|
|
129
|
+
/^\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\,\s?(?<date>.+)\s?tarihinde şunu yazdı\s?:/m // Outlook 2019 (tr)
|
|
130
|
+
],
|
|
131
|
+
|
|
112
132
|
original_subject : [
|
|
113
|
-
/^Subject\s?:(.+)/im, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
|
|
133
|
+
/^Subject\s?:(.+)/im, // Apple Mail (en), Gmail (all locales), Outlook Live / 365 (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
|
|
114
134
|
/^Předmět\s?:(.+)/im, // Apple Mail (cs), New Outlook 2019 (cs), Thunderbird (cs)
|
|
115
135
|
/^Emne\s?:(.+)/im, // Apple Mail (da, no), New Outlook 2019 (da), Thunderbird (no)
|
|
116
136
|
/^Betreff\s?:(.+)/im, // Apple Mail (de), New Outlook 2019 (de), Thunderbird (de)
|
|
@@ -152,7 +172,7 @@ var REGEXES = {
|
|
|
152
172
|
],
|
|
153
173
|
|
|
154
174
|
original_from : [
|
|
155
|
-
/^(\s*From\s?:(.+))$/m, // Apple Mail (en), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
|
|
175
|
+
/^(\s*From\s?:(.+))$/m, // Apple Mail (en), Outlook Live / 365 (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
|
|
156
176
|
/^(\s*Od\s?:(.+))$/m, // Apple Mail (cs, pl, sk), Gmail (cs, pl, sk), New Outlook 2019 (cs, pl, sk), Thunderbird (cs, sk)
|
|
157
177
|
/^(\s*Fra\s?:(.+))$/m, // Apple Mail (da, no), Gmail (da, no), New Outlook 2019 (da), Thunderbird (no)
|
|
158
178
|
/^(\s*Von\s?:(.+))$/m, // Apple Mail (de), Gmail (de), New Outlook 2019 (de), Thunderbird (de)
|
|
@@ -195,7 +215,7 @@ var REGEXES = {
|
|
|
195
215
|
],
|
|
196
216
|
|
|
197
217
|
original_to : [
|
|
198
|
-
/^\s*To\s?:(.+)$/m, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), Thunderbird (da, en), Missive (en)
|
|
218
|
+
/^\s*To\s?:(.+)$/m, // Apple Mail (en), Gmail (all locales), Outlook Live / 365 (all locales), Thunderbird (da, en), Missive (en)
|
|
199
219
|
/^\s*Komu\s?:(.+)$/m, // Apple Mail (cs), New Outlook 2019 (cs, sk), Thunderbird (cs)
|
|
200
220
|
/^\s*Til\s?:(.+)$/m, // Apple Mail (da, no), New Outlook 2019 (da), Thunderbird (no)
|
|
201
221
|
/^\s*An\s?:(.+)$/m, // Apple Mail (de), New Outlook 2019 (de), Thunderbird (de)
|
|
@@ -258,7 +278,7 @@ var REGEXES = {
|
|
|
258
278
|
],
|
|
259
279
|
|
|
260
280
|
original_cc : [
|
|
261
|
-
/^\s*Cc\s?:(.+)$/m, // Apple Mail (en, da, es, fr, hr, it, pt, pt-br, ro, sk), Gmail (all locales), Outlook Live (all locales), New Outlook 2019 (da, de, en, fr, it, pt-br), Missive (en)
|
|
281
|
+
/^\s*Cc\s?:(.+)$/m, // Apple Mail (en, da, es, fr, hr, it, pt, pt-br, ro, sk), Gmail (all locales), Outlook Live / 365 (all locales), New Outlook 2019 (da, de, en, fr, it, pt-br), Missive (en)
|
|
262
282
|
/^\s*CC\s?:(.+)$/m, // New Outlook 2019 (es, nl, pt), Thunderbird (da, en, es, fi, hr, hu, it, nl, no, pt, pt-br, ro, tr, uk)
|
|
263
283
|
/^\s*Kopie\s?:(.+)$/m, // Apple Mail (cs, de, nl), New Outlook 2019 (cs), Thunderbird (cs)
|
|
264
284
|
/^\s*Kopio\s?:(.+)$/m, // Apple Mail (fi), New Outlook 2019 (es)
|
|
@@ -301,7 +321,7 @@ var REGEXES = {
|
|
|
301
321
|
/^\s*Dată\s?:(.+)$/m, // Apple Mail (ro), Thunderbird (ro)
|
|
302
322
|
/^\s*Дата\s?:(.+)$/m, // Apple Mail (ru, uk), New Outlook 2019 (ru), Thunderbird (ru, uk)
|
|
303
323
|
/^\s*Tarih\s?:(.+)$/m, // Apple Mail (tr), Thunderbird (tr)
|
|
304
|
-
/^\s*Sent\s?:(.+)$/m, // Outlook Live (all locales)
|
|
324
|
+
/^\s*Sent\s?:(.+)$/m, // Outlook Live / 365 (all locales)
|
|
305
325
|
/^\s*Päiväys\s?:(.+)$/m // Thunderbird (fi)
|
|
306
326
|
],
|
|
307
327
|
|
|
@@ -386,8 +406,8 @@ class Parser {
|
|
|
386
406
|
// Remove Byte Order Mark
|
|
387
407
|
_body = _body.replace(this.__regexes.byte_order_mark, "");
|
|
388
408
|
|
|
389
|
-
// First method: split via the separator (Apple Mail, Gmail,
|
|
390
|
-
// Outlook 2019, Yahoo Mail, Thunderbird)
|
|
409
|
+
// First method: split via the separator (Apple Mail, Gmail, \
|
|
410
|
+
// Outlook Live / 365, Outlook 2019, Yahoo Mail, Thunderbird)
|
|
391
411
|
var _match = loopRegexes(this.__regexes.separator, _body, "split");
|
|
392
412
|
|
|
393
413
|
if (_match && _match.length > 1) {
|
|
@@ -395,7 +415,7 @@ class Parser {
|
|
|
395
415
|
body : _body,
|
|
396
416
|
|
|
397
417
|
message : trimString(_match[0]),
|
|
398
|
-
email : trimString(_match[
|
|
418
|
+
email : trimString(_match[1])
|
|
399
419
|
};
|
|
400
420
|
}
|
|
401
421
|
|
|
@@ -490,7 +510,7 @@ class Parser {
|
|
|
490
510
|
var _match = null;
|
|
491
511
|
|
|
492
512
|
// First method: extract the text after the Cc, To or Reply-To part \
|
|
493
|
-
// (Apple Mail, Gmail) or after the Subject part (Outlook Live)
|
|
513
|
+
// (Apple Mail, Gmail) or after the Subject part (Outlook Live / 365)
|
|
494
514
|
var _regexes = [
|
|
495
515
|
this.__regexes.original_subject,
|
|
496
516
|
this.__regexes.original_cc,
|
|
@@ -542,7 +562,7 @@ class Parser {
|
|
|
542
562
|
var _name = null;
|
|
543
563
|
|
|
544
564
|
// First method: extract the author via the From part (Apple Mail, Gmail, \
|
|
545
|
-
// Outlook Live, New Outlook 2019, Thunderbird)
|
|
565
|
+
// Outlook Live / 365, New Outlook 2019, Thunderbird)
|
|
546
566
|
var _author = this.__parseMailbox(this.__regexes.original_from, text);
|
|
547
567
|
|
|
548
568
|
// Author found?
|
|
@@ -551,7 +571,7 @@ class Parser {
|
|
|
551
571
|
}
|
|
552
572
|
|
|
553
573
|
// Second method: extract the author via the separator (Outlook 2019)
|
|
554
|
-
var _match = loopRegexes(this.__regexes.
|
|
574
|
+
var _match = loopRegexes(this.__regexes.separator_with_information, body);
|
|
555
575
|
|
|
556
576
|
if (_match && _match.length === 4 && _match.groups) {
|
|
557
577
|
// Notice: the order of parts may change depending on the localization, \
|
|
@@ -600,7 +620,7 @@ class Parser {
|
|
|
600
620
|
*/
|
|
601
621
|
__parseOriginalTo(text) {
|
|
602
622
|
// First method: extract the primary recipient(s) via the To part \
|
|
603
|
-
// (Apple Mail, Gmail, Outlook Live, New Outlook 2019, Thunderbird)
|
|
623
|
+
// (Apple Mail, Gmail, Outlook Live / 365, New Outlook 2019, Thunderbird)
|
|
604
624
|
var _recipients = this.__parseMailbox(
|
|
605
625
|
this.__regexes.original_to,
|
|
606
626
|
|
|
@@ -656,7 +676,7 @@ class Parser {
|
|
|
656
676
|
*/
|
|
657
677
|
__parseOriginalCc(text) {
|
|
658
678
|
// First method: extract the carbon-copy recipient(s) via the Cc part \
|
|
659
|
-
// (Apple Mail, Gmail, Outlook Live, New Outlook 2019, Thunderbird)
|
|
679
|
+
// (Apple Mail, Gmail, Outlook Live / 365, New Outlook 2019, Thunderbird)
|
|
660
680
|
var _recipients = this.__parseMailbox(
|
|
661
681
|
this.__regexes.original_cc,
|
|
662
682
|
|
|
@@ -797,7 +817,7 @@ class Parser {
|
|
|
797
817
|
*/
|
|
798
818
|
__parseOriginalSubject(text) {
|
|
799
819
|
// First method: extract the subject via the Subject part (Apple Mail, \
|
|
800
|
-
// Gmail, Outlook Live, New Outlook 2019, Thunderbird)
|
|
820
|
+
// Gmail, Outlook Live / 365, New Outlook 2019, Thunderbird)
|
|
801
821
|
var _match = loopRegexes(this.__regexes.original_subject, text);
|
|
802
822
|
|
|
803
823
|
if (_match && _match.length > 0) {
|
|
@@ -825,7 +845,7 @@ class Parser {
|
|
|
825
845
|
*/
|
|
826
846
|
__parseOriginalDate(text, body) {
|
|
827
847
|
// First method: extract the date via the Date part (Apple Mail, Gmail, \
|
|
828
|
-
// Outlook Live, New Outlook 2019, Thunderbird)
|
|
848
|
+
// Outlook Live / 365, New Outlook 2019, Thunderbird)
|
|
829
849
|
var _match = loopRegexes(this.__regexes.original_date, text);
|
|
830
850
|
|
|
831
851
|
if (_match && _match.length > 0) {
|
|
@@ -833,7 +853,7 @@ class Parser {
|
|
|
833
853
|
}
|
|
834
854
|
|
|
835
855
|
// Second method: extract the date via the separator (Outlook 2019)
|
|
836
|
-
_match = loopRegexes(this.__regexes.
|
|
856
|
+
_match = loopRegexes(this.__regexes.separator_with_information, body);
|
|
837
857
|
|
|
838
858
|
if (_match && _match.length === 4 && _match.groups) {
|
|
839
859
|
// Notice: the order of parts may change depending on the localization, \
|