如何使用移动加载项获取电子邮件正文



我正在为我的外接程序开发移动扩展点。

我想从任务窗格中获取电子邮件的 HTML 内容。

在加载项的桌面版本上,我从任务窗格 javascript 文件调用Office.context.mailbox.item.body.getAsync((,该文件工作正常。

但是,在适用于 android 的 Outlook 移动应用程序上,Office.context.mailbox.item.body是一个空对象。Office.context.mailbox.item似乎具有有关对话的所有上下文,但没有有关实际电子邮件的上下文。

如何从移动设备获取电子邮件的 HTML 正文?

要在Outlook Android上访问body,您必须使用Office.context.mailbox.item.body.getAsync((。请在下面找到相同的片段:

Office.context.mailbox.item.body.getAsync("text",
function (asyncResult) {
if (asyncResult.status == "failed") {
console.log("Action failed with error: " + asyncResult.error.message);
} else {
console.log(asyncResult.value);
}
}
);

最新更新