mail-client-extensions icon indicating copy to clipboard operation
mail-client-extensions copied to clipboard

[REF] Outlook: rework logging attachments

Open juwu-odoo opened this issue 5 months ago • 1 comments

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.

juwu-odoo avatar Jul 25 '25 14:07 juwu-odoo

@tde-banana-odoo Hi 🙂

Can you merge the pr? I investigated during my refactor, and there's indeed no better solution...

std-odoo avatar Oct 31 '25 12:10 std-odoo

@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)

std-odoo avatar Nov 27 '25 09:11 std-odoo

@juwu-odoo Hi 🙂

can you re-target the branch to 19.0?

std-odoo avatar Dec 04 '25 15:12 std-odoo

Retargeted to 19.0 https://github.com/odoo/mail-client-extensions/pull/55

juwu-odoo avatar Dec 04 '25 18:12 juwu-odoo