【问题标题】:Graph REST API [Mail] how to downlod an email .eml with attachments insideGraph REST API [Mail] 如何下载带有附件的电子邮件 .eml
【发布时间】:2020-09-04 10:32:20
【问题描述】:

以下代码是我检索 EML 文件的调用,但我还需要检索其中的附件。 我该怎么做?

jsonAttach = (StringResponse) Unirest.get(
                        String.format("https://graph.microsoft.com/v1.0/users/%s/messages/%s/$value", 
                                user_email,tempMailId))
                        .header("Accept", "application/json")
                        .header("Authorization", tokenType + " " + accessToken)
                        .asString();

【问题讨论】:

  • 你试过这样(GET graph.microsoft.com/v1.0/me/messages{id}/attachments/{id}/$value)吗?
  • 有效吗?
  • 是的,成功了,谢谢!!
  • 很棒的@Cardo。很高兴听到上述内容有所帮助。请随时投票或标记为已回答,以便对其他人有所帮助。

标签: java email microsoft-graph-api outlook-restapi microsoft-graph-mail


【解决方案1】:

这是documentation

我尝试了以下 API 调用,它对我有用。

GET graph.microsoft.com/v1.0/me/messages{id}/attachments/{id}/$value)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    • 2019-07-16
    • 2010-09-25
    • 2023-04-08
    • 2017-02-08
    • 2015-07-08
    • 1970-01-01
    相关资源
    最近更新 更多