discourse/lib/email
Régis Hanol d523c37057
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 20ba54d536 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
..
authentication_results.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
build_email_helper.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
cleaner.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
message_builder.rb FEATURE: add support for One-Click unsubscribe (RFC 8058) 2024-12-31 15:28:59 +01:00
message_id_service.rb DEV: Remove old TODOs for message-id formats (#27196) 2024-05-28 13:57:09 +10:00
poller.rb FEATURE: Add hooks for email poller plugins (#21384) 2023-06-26 13:16:03 +08:00
processor.rb FIX: Prevent Email Processor errors when mail is blank or nil (#21292) 2023-05-18 10:39:37 +08:00
receiver.rb FIX: correctly extract body and/or reply from exchange emails (#30512) 2024-12-31 15:29:36 +01:00
renderer.rb DEV: Add apply_modifier in Email::Renderer for html modifications (#25205) 2024-01-12 09:14:55 -06:00
sender.rb DEV: update base url links to respect subfolder installs (#27740) 2024-07-09 12:42:38 +04:00
styles.rb Revert "DEV: prioritize new email styles over existing, to make customization easier (#30244)" (#30297) 2024-12-16 11:16:17 +00:00
validator.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00