From ff7cd013652f1df45ad32e572c2c42f03419f6c4 Mon Sep 17 00:00:00 2001 From: Eliott Vincent Date: Tue, 12 Dec 2023 20:12:38 +0100 Subject: [PATCH] v1.6.0 Add MailMate support --- README.md | 4 ++-- lib/parser.js | 5 +++-- package.json | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cf2b72c..5f60e84 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ _👋 You use this library and you want to be listed there? [Contact us](https:/ ## Features This library is used at [Crisp](https://crisp.chat/) everyday with around 1 million inbound emails. -* Supported clients: Apple Mail, Gmail, Outlook Live / 365, Outlook 2013, Outlook 2019, New Outlook 2019, Yahoo Mail, Thunderbird, Missive, HubSpot, IONOS by 1 & 1 +* 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 * 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 ## Usage @@ -98,7 +98,7 @@ Thunderbird | Yes | Yes | No | Yes | Yes | Yes | -- Missive | Yes | Yes | No | No | Yes | No | -- HubSpot | Yes | Yes | Yes | Yes | Yes | Yes | -- IONOS by 1 & 1 | ? | Yes | ? | ? | Yes | ? | -- -MailMate | Yes | Yes | No | No | Yes | No | -- +MailMate | Yes | Yes | ? | ? | Yes | ? | -- ## Contributing diff --git a/lib/parser.js b/lib/parser.js index 6e3ac02..263bffc 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -72,8 +72,8 @@ var REGEXES = { /^>?\s*İleti başlangıcı\s?:/m, // Apple Mail (tr) /^>?\s*Початок листа, що пересилається\s?:/m, // Apple Mail (uk) /^\s*-{8,10}\s*Forwarded message\s*-{8,10}\s*/m, // Gmail (all locales), Missive (en), HubSpot (en) - /^Forwarded message:/m, // Mailmate /^\s*_{32}\s*$/m, // Outlook Live / 365 (all locales) + /^\s?Forwarded message:/m, // Mailmate /^\s?Dne\s?.+\,\s?.+\s*[\[|<].+[\]|>]\s?napsal\(a\)\s?:/m, // Outlook 2019 (cz) /^\s?D.\s?.+\s?skrev\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (da) /^\s?Am\s?.+\s?schrieb\s?\".+\"\s*[\[|<].+[\]|>]\s?:/m, // Outlook 2019 (de) @@ -636,7 +636,8 @@ class Parser { // First method: extract the text after the Subject part \ // (Outlook Live / 365) or after the Cc, To or Reply-To part \ - // (Apple Mail, Gmail). A new line must be present. + // (Apple Mail, Gmail) or Date part (MailMate). A new line must be \ + // present. // Notice: use 'line' regexes that will capture not only the Subject, Cc, \ // To or Reply-To part, but also the line itself, as we may need it \ // to build the original body back (in case of nested emails) diff --git a/package.json b/package.json index 3498669..4473a04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "email-forward-parser", - "version": "1.5.11", + "version": "1.6.0", "description": "Parses forwarded emails and extract content", "author": "Eliott Vincent ", "main": "lib/index.js",