OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

Desktop Outlook on Mac will always attach emails as .eml #4820

Open hazzinator1 opened 3 weeks ago

hazzinator1 commented 3 weeks ago

Your Environment

Expected behavior

We have a bunch of .msg files that we are storing in an online location. When a user wants to attach one of these stored emails to a draft email, we bring that .msg back into their mailbox (in the Deleted section). Once it's there, we call the Office.context.mailbox.item.addItemAttachmentAsync method with the EWS ID of the rehydrated item.

What I would expect to see is these emails being attached without an extension (i.e. a proper Outlook item), and to have them include all of the custom metadata we are putting in them (SentDate, HasAttachments, From, CC etc.). This is how it works for all other instances of this taskpane (Windows PC/OWA and Mac OWA).

Current behavior

These emails are instead getting attached as .eml files without any metadata at all. The customer loses all custom metadata about the email as soon as they attach it as an eml.

Steps to reproduce

Call Office.context.mailbox.item.addItemAttachmentAsync on any item in the user's mailbox and confirm that the item appears as a .eml rather than a .msg or an actual Outlook item.

Context

Makes the experience on desktop outlook poor for our users as they can't share emails correctly

rajjha-msft commented 2 weeks ago

Hey @hazzinator1

This is by design. You can check out the links below

Outlook for Mac does not natively support the .msg file format, which is proprietary to Outlook on Windows. When you attach a .msg file in Outlook for Mac, the application automatically converts it to a .eml file upon sending because it handles .eml files natively. This conversion process is built into the way Outlook for Mac processes attachments, and there isn't a way to disable it within the application.