Can't read nested email attachment
还没有人认领这个 Issue。
评估
调研方向
首先使用 SDK 6.34.0 重现 Outlook 桌面版场景,并检查针对 message/rfc822 内容的 attachments() 结果。然后,将 byMessageId(...) 使用的附件 ID 与返回的邮件进行比较,并确定是否支持预期的嵌套邮件获取;行为得到修正或其限制得到明确确认,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
My email message has a attachment which is also an email. The SDK sees this attachment as FileAttachment. With the contentType I can detect that the attachment is in fact an email (message/rfc822). But I don't have the possibility to retrieve this messages with it's own attachments. I tried the following with the id of the attachment but it seems it returns the original email and not the email as attachment even though the id of the original email and the id of the email attachment differ:
graphClient.users().byUserId(username).messages().byMessageId(attachment.id).get()
Apparently this situation occurs when attaching another email as attachment with the Oulook desktop application. When I do this in Gmail the attached emails are shown as ItemAttachment.
Expected behavior
Well I first expected that an email attachment would be an ItemAttachment type instead of a FileAttachment. Second I expected that: graphClient.users().byUserId(username).messages().byMessageId(attachment.id).get() would return the email attachment instead of the original email.
How to reproduce
In the Outlook desktop application create an email which has another email as attachment (EML format). The email as attachment also has an attachment. Try to retrieve all (nested) attachments from the original email using:
graphClient.users().byUserId(username).messages().byMessageId(mailId).attachments().get().value?.forEach { attachment ->
if (attachment is ItemAttachment) {
...
}
else if (attachment.contentType == "message/rfc822") {
val message = getUser().messages().byMessageId(attachment.id).get()
// handle nested emails
}
else if (attachment is FileAttachment) {
}
}
SDK Version
6.34.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
macOS Sequoia
M4 Max
### Other information
_No response_
- 主要语言
- Java
- 星标
- 444
- 派生
- 154
- 平均合并
- 18 小时 28 分钟
- 30 天内合并 PR
- 4
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-java 的其他 Issue
-
status:waiting-for-triage type:bug
难度 2/5 1-3 小时 新手友好度 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
难度 3/5 1-2 天 新手友好度 55/100
microsoftgraph/msgraph-sdk-java#2656 ·
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
难度 4/5 3-5 天 新手友好度 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
status:waiting-for-triage type:bug
难度 3/5 1-2 天 新手友好度 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 条评论 ·
查看 microsoftgraph/msgraph-sdk-java 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
bug needs triage p2
难度 2/5 1-3 小时 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 76/100