Office.context.mailbox.item.saveAsync fails during OnSend function on Outlook for web/New Outlook
I've already asked this question but I get a 404 when trying to access it, so I'm trying to repost it.
I have an Add-in created for Outlook Web which adds headers to emails in order to send them securely. It operated both through Task Pane and on the OnSend functionality of Outlook Web.
When pressing the Outlook Send Button (OnSend function), I try to save the email as a draft in order to get the draft ID adn set some headers and then send the item using Microsoft Graph API.
When pressing the Outlook Send Button the Office.context.mailbox.item.saveAsync() function fails with :
error: OSF_DDA_Error code: 9021 message: "Connection error occurred while trying to save the item on the server." name: "SaveError"
If I save the draft manually, or it gets automatically saved by Outlook or do the same flow using the Task Pane (opening the add-in through the Apps button), it works correctly.
It is only happening on new emails.
this wasn't happening before and we didn't do any change in this part of the code. It started happening since the 31 January 2025 (I saw that there was an update of the 30th of January). could this be an issue with outlook/office-js or outlook? since this wasn't happening before this point of time and we didn't do any changes in the code?
I also raised an issue on the github page: https://github.com/OfficeDev/office-js/issues/5345