microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Missing .eml Extension in the file name and Null MIME Type for .eml Attachments

Open
#2,712 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug

When retrieving .eml file attachments using the Microsoft Graph SDK for Outlook mail items, the attachment name does not include the .eml extension, and the content-type/mime-type is returned as null. This results in improper handling of .eml files on the client side.

Expected behavior

When fetching .eml attachments, the expected output should include:

The attachment name should be formatted as attachment.eml.
The content-type/mime-type should be message/rfc822 or similar, indicating that the file is an email message.

Expected behaviour with the example of pdf file and the existing behaviour for .eml file
image

How to reproduce

Make an API call to retrieve a message that contains an .eml attachment using the endpoint:
GET https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments
Identify an attachment with the .eml type from the response.
Call the endpoint to get the content of the attachment:
GET https://graph.microsoft.com/v1.0/me/messages/{messageId}/attachments/{attachmentId}/$value
Observe that the name of the attachment does not include the .eml extension and that the content-type/mime-type is null.

SDK Version

5.16.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with GET /v1.0/me/messages/{messageId}/attachments and the attachment $value endpoint for an .eml file. The payload names no repository files or tests; done means the returned attachment name includes the .eml extension and its content type is message/rfc822 or similar.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.