OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
688 stars 94 forks source link

New Outlook for Mac converts inline images inserted from appendOnSendAsync into attachments #3372

Open bchenhs opened 1 year ago

bchenhs commented 1 year ago

Provide required information needed to triage your issue

On the New Outlook for Mac, inline images are getting converted to attachments (with cid) when inserted using appendOnSendAsync. This issue only occurs on the New Outlook for Mac.

Similar issue closed before: https://github.com/OfficeDev/office-js/issues/1660

Your Environment

Expected behavior

Inline images inserted with appendOnSendAsync should remain inline instead of getting converted into attachments.

Current behavior

Inline images inserted with appendOnSendAsync are getting converted into attachments.

Steps to reproduce

https://gist.github.com/bchenhs/b76551f7182965602a665a27223599c4

Link to live example(s)

https://gist.github.com/bchenhs/b76551f7182965602a665a27223599c4

Provide additional details

Context

This issue blocks one major functionality in our add-in on the New Outlook for Mac.

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

exextoc commented 1 year ago

@bchenhs We tried to repro this using the gist you provided. The attachment works fine and gets attached as inline attachment itself. Can you share a video of this issue so that we can understand the issue better?

bchenhs commented 1 year ago

Hi @exextoc, thanks for getting back to us. The issue here is the inline image (e.g. <img ... src="https://someurl.com/image"/>) gets converted into an inline attachment: (e.g. <img ... src="cid:..."/>). We expect the original src to remain when using appendOnSendAsync. This only happens with the New Outlook for Mac, inconsistent with the rest of the platforms.

exextoc commented 1 year ago

@bchenhs Thanks for reporting the issue regarding appendOnSendAsync. It has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: Office: 7957425

bchenhs commented 1 year ago

~Hi @exextoc, looks like this issue has been addressed, as we are able to add inline images using appendOnSend without it being converted to attachments. Thank you!~ Update: this issue still occurs.

However, this fix seems to have introduced a regression that removes any regular attachments to the email. It is reported by this issue: https://github.com/OfficeDev/office-js/issues/3598

jameschheng commented 11 months ago

Update: this issue is still occurring. We are trying to create a simple email tracking feature by inserting an image to trigger when the email has read but because the image is being converted to an inline attachment, we are unable to do so. As mentioned before, this is only specific to the new Outlook for Mac.

bchenhs commented 10 months ago

Hi @exextoc any update on when we can expect this issue to be addressed? This is blocking a critical functionality to our add-in with over 100k daily active users.

bchen-hs-eng commented 6 months ago

Hi @exextoc Is there any update on this issue? When we use the appendOnSend interface, we expect the inserted HTML to remain unmodified.