How can we read a mailbox in layout mode using the office 365 java-script API

How can we read mail in compose mode using the Office 365 JavaScript API?

For example:

Office.initialize = function (reason) {
    var body = Office.context.mailbox.item.body;
};

      

+3


source to share


1 answer


Edit: Good news for anyone looking to achieve the same scenario - we have an API that you can use to get the body of a post in compose mode. You can learn about the new API here: https://dev.outlook.com/reference/add-ins/Body.html#getAsync




Unfortunately, there is currently no clean way to achieve this. However, we are constantly working on APIs and it is possible that this functionality will be added in the future, so please stay tuned!

The closest workaround we can get right now is that you have to tell the user to save the draft, get the EWS ID and make an EWS request to get the body, but that's not very useful, is it? :)

+6


source







All Articles