通过 Graph 在 Outlook Addin 中获取 MIME 邮件内容

Get MIME mail content in Outlook Addin via Graph

我正在尝试创建一个 outlook 插件,它以 .MSG 或 .EML 格式读取选定的邮件。我找到了一个 with a link to this documentation how to read a mail from Graph: https://docs.microsoft.com/en-us/graph/outlook-get-mime-message. I tried to use https://graph.microsoft.com/v1.0/me/messages/{id}/$value with the Graph tester。我输入了我能在 Office.context.mailbox.item 中找到的所有 ID,但其中的 none 给了我一个有效的结果。那么我必须从哪里获取 id,Graph Tester 需要?

我发现:Office.context.mailbox.item.itemId.replace('/', '-').replace('+', '_'); 获得相同的 ID,图表在通过 https://graph.microsoft.com/v1.0/me/messages 请求所有消息时给出。我只是不知道为什么我必须替换 id 中的字符。