I’m working on an Outlook JavaScript React plugin aimed at routing emails through a third-party service instead of sending them directly from Outlook Web/New Outlook application.
My current approach involves intercepting the Send event via Smart Alerts, forwarding the email details to the third-party app, and then saving the email as a draft by calling event.completed({allowEvent:false})
.
However, this will always trigger an ‘error’ dialog like below
Though it’s possible to change the button and message to make it look like the Send has been done, it still looks like something wrong has happened. There are also other issues like if taskpane is closed, then the message cannot be closed because closeAsync can only be triggered in taskpane.
Is there a better way to do this?