Skip to content

[ADD] mail_incoming_malformed_permissive: handle known malformed incoming emails - #370

Open
divad1196 wants to merge 2 commits into
OCA:18.0from
camptocamp:18.0-add-mail_incoming_malformed_permissive
Open

divad1196 wants to merge 2 commits into
OCA:18.0from
camptocamp:18.0-add-mail_incoming_malformed_permissive

Conversation

@divad1196

@divad1196 divad1196 commented Nov 26, 2026 •

Copy link
Copy Markdown

Context

Some email clients can send non-standard or malformed emails.
For a business, it's critical that we can handle the emails.

The goal of this module is to handle non-standard cases the best we can.

Fix

Keep every <html> tag received, not just the first one. ℹ️ This is only usefull if you have libxml2 2.10 or later

@OCA-git-bot OCA-git-bot added series:18.0 mod:mail_incoming_malformed_permissive Module mail_incoming_malformed_permissive labels Nov 26, 2026
@divad1196
divad1196 force-pushed the 18.0-add-mail_incoming_malformed_permissive branch 2 times, most recently from 06dcdfd to 6864289 Compare November 26, 2026 13:36

@TDu TDu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@divad1196
divad1196 force-pushed the 18.0-add-mail_incoming_malformed_permissive branch 2 times, most recently from 98fa178 to 6d619fe Compare November 27, 2026 14:53
@divad1196

Copy link
Copy Markdown
Author

@TDu

Should it also handle this part of the flow ?
https://github.com/odoo/odoo/blob/18.0/addons/mail/models/mail_thread.py#L1642-L1654

I didn't think of multipart (and just learnt exactly how this works).
I made a new commit for that.

@divad1196
divad1196 force-pushed the 18.0-add-mail_incoming_malformed_permissive branch 2 times, most recently from 6d0e318 to 499c4cc Compare November 27, 2026 15:41
…ming mails

- keep every <html> received, not just the first one
Fix every html part, not just a mail made of a single html part.
@divad1196
divad1196 force-pushed the 18.0-add-mail_incoming_malformed_permissive branch from 499c4cc to 89e56ca Compare November 27, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:mail_incoming_malformed_permissive Module mail_incoming_malformed_permissive series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants