We are trying to capture the time spent on all emails(read mode) by using the outlook add-In TaskPane capablity as other mechanism are not supported(Event based add-In or UI-less(as its needs manual click for each email)..
Currently we were able to track the events using ItemChanged event.
Office.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, this.OnItemChanged, this.OnItemChangeComplete);
But when we look to capture the events for OnClose of taskpane for the use case that user finished reading last email and want to close it, we were not able to capture them.
Is there a plan to support this use case or any suggestions to deal this scenario.. I have came across multiple similar problems related to this, but don't find any alternative for this.
We also looking for this for our feature implementation. It would be good if there is an update on this as well. Thanks
https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/port-office-addin-api-functions-to-outlook-js-addin/idi-p/2277783
https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/port-office-addin-api-functions-to-outlook-js-addin/idi-p/2277783