Can't read nested email attachment
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện kịch bản Outlook trên máy tính để bàn với SDK 6.34.0 và kiểm tra kết quả của attachments() đối với nội dung message/rfc822. Sau đó, so sánh ID tệp đính kèm được byMessageId(...) sử dụng với thư được trả về và xác định liệu việc truy xuất email lồng nhau như mong đợi có được hỗ trợ hay không; công việc được xem là hoàn tất khi hành vi này được sửa hoặc giới hạn của nó được xác lập rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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_
- Ngôn ngữ chính
- Java
- Star
- 444
- Fork
- 154
- Merge trung bình
- 18 giờ 28 phút
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-java
-
status:waiting-for-triage type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoftgraph/msgraph-sdk-java#2656 ·
-
status:waiting-for-triage type:bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
Error in PATCH onlineMeeting Đang mởstatus:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 bình luận ·