I'm working on an Outlook plugin using the office js library. Part of the functionality of the application is to store emails in our cloud platform so they can be related to other data in the system. In order to make it a one step process we wanted to enable the user to send the email from within of our add-in. I managed to achieve this by calling the item.saveAsync method to save the item as a draft then from the REST API I can call messages/{itemId}/send which successfully sends the email after which I can send the details to our cloud platform. My only issue is that the Outlook UI (testing outlook.live.com right now) never updates. I'm hunting around the office js API for a way to trigger the UI to redraw / close the editor etc etc but i'm drawing a blank. Any help would be appreciated.
If I can't update the UI is there a better way to get the details of the email after it is sent? I know the SentItem handler is a possibility but it's my understanding that that is only used for add-ins with no UI and we need the context of the add-in to know what do do with the email information in our cloud platform.