如何从Microsoft Outlook加载项中检索完整的MIME消息? [英] How can I retrieve the full MIME message from an Microsoft Outlook Add-In?

查看:308
本文介绍了如何从Microsoft Outlook加载项中检索完整的MIME消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Outlook Web Access加载项,我想在其中访问电子邮件的所有数据,包括发件人地址,收件人地址,主题和发送日期等.我还想下载整个邮件文件.我发现了一个 Outlook Web REST API ,但不知道如何使用它.

I am developing an Outlook Web Access Add-In in which I want to access all the data of an email including sender address, recipient address, subject and sent date etc. I also want to download the entire message file. I have found one Outlook Web REST API but don't know how to use it.

任何人都可以解释如何使用此API检索整个MIME消息并提供示例吗?

Can anyone explain how to use this API to retrieve the entire MIME message and provide an example?

推荐答案

1 .要获取消息详细信息,您可以使用office.js中可用的javascript API.请参阅该链接,以获取有关某项可用的各个API的详细信息:

1. To get the message details you can use the javascript APIs available in office.js. Refer the link for details on individual APIs that are available on an item:

2 .获取完整的消息文件. GetMessage API不会为您提供.msg文件,但会获取消息的所有属性,您可以使用它来获取有关消息的其他详细信息,而这些信息不是javascript API直接提供的.

2. To get the entire message file. GetMessage API does not provide you with a .msg file but it will fetch you all the properties of the message, you can use this to get extra details about the message which are not provided by the javascript APIs directly.

3..可以通过以下两个步骤来获取.eml文件:

3. There is a way to get a .eml file using the following two steps:

第1步::使用JS API getCallbackTokenAsync([options],callback)获取EWS回调令牌.参考链接:

Step1: Get a EWS callback token using the JS API getCallbackTokenAsync([options], callback). Refer link:

https://dev.office.com/reference/add-ins/outlook/1.5/Office.context.mailbox?product=outlook&version=v1.5

步骤2::使用服务器上的此令牌发出EWS请求,以将IncludeMimeContent设置为true的项目获取,并将响应另存为.eml文件.参考链接:

Step2: With this token from your server make an EWS request to get the item with IncludeMimeContent set to true and save the response as a .eml file. Refer link:

https://msdn. microsoft.com/en-us/library/office/aa566013(v=exchg.150).aspx

这篇关于如何从Microsoft Outlook加载项中检索完整的MIME消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆