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
689 stars 95 forks source link

Outlook: Message body is removed from saved draft email #4396

Open MrDaleQ opened 7 months ago

MrDaleQ commented 7 months ago

Your Environment

Expected behavior

An email is saved as draft. On opening the draft, the email body is not removed.

Current behavior

We are seeing a number of reports from customers that the mail body is removed from a draft email when a draft email is reopened. Customer currently has a case open with MS Support, with a reproducible case of the issue - TrackingID#2404150050003156

Steps to reproduce

Create a new email and enter text in the body. Save the email as draft or allow the email to save as draft my moving to another email. Open the drafts folder in Outlook. The draft preview does not display the edited email. Opening the draft does not display the edited test

Context

We have seen this issue reported by customers since around February 2024, and are seeing more reports of this problem as time goes on.

We are currently checking to find if this issue is triggered by our Outlook add-in and I will update this as we find more information.

MrDaleQ commented 6 months ago

@exextoc is there any update on this issue?

We are seeing this reported by an increasing number of customers and now have replicatable instances of the issue.

ndeleuze commented 6 months ago

@MrDaleQ would you be able to provide more information about your add-in? The manifest and source code would help us investigate the issue and determine if your add-in is the cause. If this is the case, then the code that runs during the OnMessageCompose event would most likely be the culprit.

MrDaleQ commented 6 months ago

Hi @ndeleuze, thanks for replying here.

The addin manifest can be pulled from outlook.signature365.com/manifest.xml

The add-in itself has been in production for a number of years now, and this issue did not appear until the start of Feb '24 - from my understanding with the dev team, no changes have been made to the OnmessageCompose code recently.

@barclayadam are you able to add anything here?

ndeleuze commented 6 months ago

@MrDaleQ it looks to me from your manifest that you are not subscribing to the OnMessageCompose event, only OnNewMessageCompose. Would you be able to provide some of the launch event code from your Add-in and/or describe the functionality of your Add-in?

barclayadam commented 6 months ago

@ndeleuze Hi, I'm the lead developer of the above mentioned add-in.

You are correct, the add-in only subscribes to OnNewMessageCompose. We have been using that since the first set of events were released and have not investigated adding / changing to the OnMessageCompose event yet.

Our add-in provides signature management, using the built-in setSignatureAsync Office API.

Regardless of the events we use, we do not modify the email body. We use setSignatureAsync to insert the signature (plus adding inline attachments as base64).

In a very few specific instances, with our task pane open and when changing the From address we do small adjustments to fix duplicate newlines inserted by Outlook (which may no longer be needed), but that is not what we are seeing here.

MrDaleQ commented 6 months ago

@ndeleuze please see the update from adam above

MrDaleQ commented 5 months ago

@ndeleuze Kwame is currently speaking to one of our customers that is experiencing this issue. I will update as / when I hear back.