I am developing an Outlook add-in that sets the mail body to some specific content, then sends the mail. However, the Office.js APIs do not offer the send mail functionality; hence the mail has to be sent either by making an EWS request or by using Graph.
If Office.Body.setAsync
is called, is the mail guaranteed to be synced with the server? If not, is there any way to ensure the same?
The Office.MessageCompose.saveAsync
docs mention the following:
If your add-in calls saveAsync on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced to the server. Until the item is synced, using the item ID will return an error.
Is the above applicable to Office.Body.setAsync
as well? If yes, how do you "force" a sync. And if you can't do that either, how do you know the mail has synced? When a sendMail request is fired via Graph, how does one assert that the mail content has been set successfully?