Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook Desktop does not parse the forwarded email #3

Closed
katlim-br opened this issue Jan 12, 2022 · 11 comments
Closed

Outlook Desktop does not parse the forwarded email #3

katlim-br opened this issue Jan 12, 2022 · 11 comments

Comments

@katlim-br
Copy link

Hi

We have this email that comes forwarded from Outlook Desktop, and the library does not parse it.

This is the email (one peculiarity is the body is sent in base64) as smtp.

--_000_MWHPR12MB18567616136F0AE4AF3AF9BFCF529MWHPR12MB1856namp_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

CgpGcm9tOiBKb2UgTW9udGFuYSA8am9lbW9udGFuYUBlbWFpbC5jb20+ClNlbnQ6IFR1ZXNkYXksIEphbnVhcnkgMTEsIDIwMjIgMzozNCBQTQpUbzogTWFyeSBNb250YW5hIDxtYXJ5bW9udGFuYUBlbWFpbC5jb20+ClN1YmplY3Q6IFByZXNzaW5nIG1hdHRlcgoKSGkKCkJ5ZQo=

Decoded is:



From: Joe Montana <joemontana@email.com>
Sent: Tuesday, January 11, 2022 3:34 PM
To: Mary Montana <marymontana@email.com>
Subject: Pressing matter

Hi

Bye

NOTE: I had to fake the email and the base64, so in theory it does work.

After some tests and playing around with the text, I was able to workaround this by adding a __ separator at the beginning, kind of tricking the library so it can parse it.

This would be how it would work, but obviously we want to try to avoid this minor hacks.

____________________________


From: Joe Montana <joemontana@email.com>
Sent: Tuesday, January 11, 2022 3:34 PM
To: Mary Montana <marymontana@email.com>
Subject: Pressing matter

Hi

Bye

Can a fix be possible (so we don't have to add the workaround)?

Thanks!

@eliottvincent
Copy link
Member

Hey! Do you have more information about the Outlook version / OS version?
From what I can see, it looks quite similar to the "New" Outlook 2019.

Furthermore, having the subject of the email would help me a lot.
If possible, could you forward an email from your Outlook Desktop to eliott@crisp.chat?

@katlim-br
Copy link
Author

Yes, it is Outlook 2019 Windows Desktop.

Sorry I cannot send an email.

@eliottvincent
Copy link
Member

Outlook 2019 is definitely supported.

With Outlook 2019, there's no way to distinguish a forwarded email from a regular replied email (there's no separator).
So you must provide both the email body and the subject in the read() method, to make the detection work correctly.

@katlim-br
Copy link
Author

so I did, but it did not work all times.

@eliottvincent
Copy link
Member

Ok, can you share the body + the subject of a failed detection? I'll investigate on my side.

@katlim-br
Copy link
Author

It is above, but I can copy it down here


From: Joe Montana <joemontana@email.com>
Sent: Tuesday, January 11, 2022 3:34 PM
To: Mary Montana <marymontana@email.com>
Subject: Pressing matter

Hi

Bye

I dont know if it is important, but the body came as base64 (Outlook 2019 does this) and then we parse the SMTP email and convert it (using mailparser library).

Btw, I'm using
"email-forward-parser": "^1.0.7"

@eliottvincent
Copy link
Member

The base64 is not important, as long as you base the decoded body.
I need the subject of the email as well. This is only the body.

@katlim-br
Copy link
Author

It is there. It is "Pressing matter".

@eliottvincent
Copy link
Member

eliottvincent commented Jan 13, 2022

No, this is the original subject.
I need the subject of the parent email. Something like "Fwd: Pressing matter". This is what you need to pass to the read() method to help the detection :)

@katlim-br
Copy link
Author

it is Fw: Pressing matter.

But then I tested it with sending the root subject, and it worked! Even removing the additional bar that I added as workaround.

So I think that was it.

Thanks!

@eliottvincent
Copy link
Member

Yes, passing this "Fw: Pressing matter" subject improves the detection in the case of Outlook 2019.
Glad it's working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants