email-forward-parser 1.0.16 → 1.0.17

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 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
27
+ * Supported clients: Apple Mail, Gmail, Outlook Live, 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
@@ -95,6 +95,7 @@ Outlook 2019 | Yes | Yes | No | Yes | No | Yes | The From and Date parts (only o
95
95
  New Outlook 2019 | Yes | No | Yes | -- | Yes | Yes | --
96
96
  Yahoo Mail | Yes | Yes | No | Yes | Yes | Yes | The original information are all stuck to each other, without line breaks
97
97
  Thunderbird | Yes | Yes | No | Yes | Yes | Yes | --
98
+ Missive | Yes | Yes | No | No | Yes | No | --
98
99
 
99
100
  ## Contributing
100
101
 
package/lib/parser.js CHANGED
@@ -33,7 +33,7 @@ var REGEXES = {
33
33
  /^VL:(.*)/m, // New Outlook 2019 (fi)
34
34
  /^Videresend:(.*)/m, // New Outlook 2019 (no)
35
35
  /^İLT:(.*)/m, // New Outlook 2019 (tr)
36
- /^Fwd:(.*)/m // Gmail (all locales), Thunderbird (all locales)
36
+ /^Fwd:(.*)/m // Gmail (all locales), Thunderbird (all locales), Missive (en)
37
37
  ],
38
38
 
39
39
  separator : [
@@ -59,7 +59,7 @@ var REGEXES = {
59
59
  /^>?\s*Vidarebefordrat mejl\s?:/m, // Apple Mail (sv)
60
60
  /^>?\s*İleti başlangıcı\s?:/m, // Apple Mail (tr)
61
61
  /^>?\s*Початок листа, що пересилається\s?:/m, // Apple Mail (uk)
62
- /^\s*-{8,10}\s*Forwarded message\s*-{8,10}\s*/m, // Gmail (all locales)
62
+ /^\s*-{8,10}\s*Forwarded message\s*-{8,10}\s*/m, // Gmail (all locales), Missive (en)
63
63
  /^\s*_{32}\s*$/m, // Outlook Live (all locales)
64
64
  /^\s?Dne\s?(?<date>.+)\,\s?(?<from_name>.+)\s*[\[|<](?<from_address>.+)[\]|>]\s?napsal\(a\)\s?:/m, // Outlook 2019 (cz)
65
65
  /^\s?D.\s?(?<date>.+)\s?skrev\s?\"(?<from_name>.+)\"\s*[\[|<](?<from_address>.+)[\]|>]\s?:/m, // Outlook 2019 (da)
@@ -110,7 +110,7 @@ var REGEXES = {
110
110
  ],
111
111
 
112
112
  original_subject : [
113
- /^Subject\s?:(.+)/im, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en)
113
+ /^Subject\s?:(.+)/im, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
114
114
  /^Předmět\s?:(.+)/im, // Apple Mail (cs), New Outlook 2019 (cs), Thunderbird (cs)
115
115
  /^Emne\s?:(.+)/im, // Apple Mail (da, no), New Outlook 2019 (da), Thunderbird (no)
116
116
  /^Betreff\s?:(.+)/im, // Apple Mail (de), New Outlook 2019 (de), Thunderbird (de)
@@ -152,7 +152,7 @@ var REGEXES = {
152
152
  ],
153
153
 
154
154
  original_from : [
155
- /^(\s*From\s?:(.+))$/m, // Apple Mail (en), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en)
155
+ /^(\s*From\s?:(.+))$/m, // Apple Mail (en), Outlook Live (all locales), New Outlook 2019 (en), Thunderbird (da, en), Missive (en)
156
156
  /^(\s*Od\s?:(.+))$/m, // Apple Mail (cs, pl, sk), Gmail (cs, pl, sk), New Outlook 2019 (cs, pl, sk), Thunderbird (cs, sk)
157
157
  /^(\s*Fra\s?:(.+))$/m, // Apple Mail (da, no), Gmail (da, no), New Outlook 2019 (da), Thunderbird (no)
158
158
  /^(\s*Von\s?:(.+))$/m, // Apple Mail (de), Gmail (de), New Outlook 2019 (de), Thunderbird (de)
@@ -195,7 +195,7 @@ var REGEXES = {
195
195
  ],
196
196
 
197
197
  original_to : [
198
- /^\s*To\s?:(.+)$/m, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), Thunderbird (da, en)
198
+ /^\s*To\s?:(.+)$/m, // Apple Mail (en), Gmail (all locales), Outlook Live (all locales), Thunderbird (da, en), Missive (en)
199
199
  /^\s*Komu\s?:(.+)$/m, // Apple Mail (cs), New Outlook 2019 (cs, sk), Thunderbird (cs)
200
200
  /^\s*Til\s?:(.+)$/m, // Apple Mail (da, no), New Outlook 2019 (da), Thunderbird (no)
201
201
  /^\s*An\s?:(.+)$/m, // Apple Mail (de), New Outlook 2019 (de), Thunderbird (de)
@@ -258,7 +258,7 @@ var REGEXES = {
258
258
  ],
259
259
 
260
260
  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)
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)
262
262
  /^\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
263
  /^\s*Kopie\s?:(.+)$/m, // Apple Mail (cs, de, nl), New Outlook 2019 (cs), Thunderbird (cs)
264
264
  /^\s*Kopio\s?:(.+)$/m, // Apple Mail (fi), New Outlook 2019 (es)
@@ -291,7 +291,7 @@ var REGEXES = {
291
291
  ],
292
292
 
293
293
  original_date : [
294
- /^\s*Date\s?:(.+)$/m, // Apple Mail (en, fr), Gmail (all locales), New Outlook 2019 (en, fr), Thunderbird (da, en, fr)
294
+ /^\s*Date\s?:(.+)$/m, // Apple Mail (en, fr), Gmail (all locales), New Outlook 2019 (en, fr), Thunderbird (da, en, fr), Missive (en)
295
295
  /^\s*Datum\s?:(.+)$/m, // Apple Mail (cs, de, hr, nl, sv), New Outlook 2019 (cs, de, nl, sv), Thunderbird (cs, de, hr, nl, sv)
296
296
  /^\s*Dato\s?:(.+)$/m, // Apple Mail (da, no), New Outlook 2019 (da), Thunderbird (no)
297
297
  /^\s*Fecha\s?:(.+)$/m, // Apple Mail (es), New Outlook 2019 (es), Thunderbird (es)
@@ -326,6 +326,8 @@ var REGEXES = {
326
326
  ],
327
327
 
328
328
  mailbox : [
329
+ /^\s?\n?\s*<.+?<mailto\:(.+?)>>/, // "<walter.sheltan@acme.com<mailto:walter.sheltan@acme.com>>"
330
+ /^(.+?)\s?\n?\s*<.+?<mailto\:(.+?)>>/, // "Walter Sheltan <walter.sheltan@acme.com<mailto:walter.sheltan@acme.com>>"
329
331
  /^(.+?)\s?\n?\s*[\[|<]mailto\:(.+?)[\]|>]/, // "Walter Sheltan <mailto:walter.sheltan@acme.com>" or "Walter Sheltan [mailto:walter.sheltan@acme.com]" or "walter.sheltan@acme.com <mailto:walter.sheltan@acme.com>"
330
332
  /^\'(.+?)\'\s?\n?\s*[\[|<](.+?)[\]|>]/, // "'Walter Sheltan' <walter.sheltan@acme.com>" or "'Walter Sheltan' [walter.sheltan@acme.com]" or "'walter.sheltan@acme.com' <walter.sheltan@acme.com>"
331
333
  /^\"\'(.+?)\'\"\s?\n?\s*[\[|<](.+?)[\]|>]/, // ""'Walter Sheltan'" <walter.sheltan@acme.com>" or ""'Walter Sheltan'" [walter.sheltan@acme.com]" or ""'walter.sheltan@acme.com'" <walter.sheltan@acme.com>"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "email-forward-parser",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Parses forwarded emails and extract content",
5
5
  "author": "Eliott Vincent <eliott@crisp.chat>",
6
6
  "main": "lib/index.js",