[REF] Outlook: rework logging attachments
Currently logging emails with attachments can encounter several issues, including:
- Error if there's a mismatch between the number of img tags and inline attachments
- Images will sometimes be embedded in the wrong order
- URL images are incorrectly overwritten
This commit refactors logRequest to be invariant to the email body and possible missing, extra, and/or out-of-order attachments. This is done by processing the .eml data directly and mapping attachments directly to img tags via contentId. Processing the .eml data is needed since the outlook-js API does not expose a method to fetch the attachment's contentId.
@tde-banana-odoo Hi 🙂
Can you merge the pr? I investigated during my refactor, and there's indeed no better solution...
@tde-banana-odoo Ping 🙂 there's now a ticket about it: https://www.odoo.com/odoo/my-support-tasks/5168674 (I don't have the right to merge PR in this repo)
@juwu-odoo Hi 🙂
can you re-target the branch to 19.0?
Retargeted to 19.0 https://github.com/odoo/mail-client-extensions/pull/55