Files
forum/spec/fixtures/emails/exchange_html_reply.eml
Régis HanolandGitHub acf7d22253 FIX: correctly extract body and/or reply from exchange emails (#30512)
When receiving emails sent with Exchange, we look for some markers to identify the body of the mail and the reply (aka. previous email).

For some reasons, those markers aren't 100% reliable and sometimes, only one of them is present.

The commit ea61fb1bd0 introduced the bug because the `HTML_EXTRACTERS` regex for exchange looks for either `messageBodySection` or `messageReplySection` but we were only using the `reply` section. So if an email had only the `body` section, it would not be correctly extracted.

This commit handle the cases where either one of them is missing and use the other one as the actual "reply". When both are present, it correctly elides the "reply" section.
2024-12-31 15:29:36 +01:00

15 lines
396 B
Plaintext

Return-Path: <[email protected]>
From: Foo Bar <[email protected]>
To: [email protected]
Date: Fri, 15 Jan 2017 00:12:43 +0100
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div>
<div name="messageReplySection">
<p>This is the <b>body !!</b> of the email.</p>
</div>
</div>