EmailReplyParser icon indicating copy to clipboard operation
EmailReplyParser copied to clipboard

Handle O365 Outlook replies

Open TBG-FR opened this issue 4 years ago • 1 comments

Hello there !

While using a Mantis BT plugin which is using your awesome lib, I noticed the that the <EMAIL> is no longer present, and From : is prefixed with **, that's why I modified the according regex.


Outlook O365 replies are formatted as follows:

* * *

**From :** Firstname LASTNAME 

**Sent :** mardi 3 août 2021 18:41

**To :** Firstname LASTNAME ; Firstname LASTNAME 

**Object :** RE: Nouveau ticket par mail [0000051] 

I still have some questions to improve this PR

  • Should I include * * * and the line-breaks to the regex (making them optional probably) ?
  • Should I check for ** after the From : ? (adding a second [\*]{0,2})
  • Should I replace [\*]{0,2} with [\*]* ? (So if Microsoft or another mailer decides to use more than two * it'll be handled)

I didn't modified or ran the tests yet.

Thanks in advance for your reviews !

TBG-FR avatar Aug 04 '21 08:08 TBG-FR

The ** come from the BBcode support in MantisBT to make the text bold. So this is caused by a specific combination of features in MantisBT and EmailReporting. Might be better to only fix this in EmailReporting since EmailReplyParser will probably have little use for this change.

<EMAIL> not being present is an Outlook thing where it sometimes does not include it. I'm unsure in what situations it suppresses it though.

SL-Gundam avatar Aug 04 '21 11:08 SL-Gundam