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
667 stars 94 forks source link

Mac OS - Outlook Desktop issue reading From Address when sending on behalf of another mailbox. #4687

Closed aantimengocom closed 1 month ago

aantimengocom commented 1 month ago

We are now really close to releasing our newly re-written Office 365 Addin, and at the moment we are working on support for this Addin on MacOS

I have hit a wall with MacOS and the Office.js api, it does things differently in MAC Outlook Desktop than on the other platforms (Windows Desktop, New Outlook, Online all works as expected).

Scenario is..

  1. As a user, I wish to send an email from another mailbox (On Behalf of) – I select another From address in the Email Client
  2. This triggers an event – From Address is changed – I read the new From address and uses this for validation of settings the addin is performing a. Works on Windows Classic, Windows New Outlook, Online Windows and Online Mac b. Does NOT work on Mac Outlook Desktop.

The API I am using to get the From address is:

Office.context.mailbox.item.from.getAsync(

In windows it results in a new Email address being the one selected ..

On Mac OS Desktop – it is not changing the email address to the newly selected email address – it stays the same.

Here is the expected change from the way we use it on Office Online version: image

Changing the From address: image

On Windows New Outlook Desktop: image

Changing the From address: image

Now on MAC OS – Desktop Version : image

When changing the From address to ‘sikkerpost@dev1.timengodpg.com’ – the API of Office.js Office.context.mailbox.item.from.getAsync( returns the ‘brugerb@dev1.timengodpg.com’ address – it does not pick up the real From address (On behalf of) which should be ‘sikkerpost@dev1.timengodpg.com’

image

I have tried all sorts of endpoints in the API to get the temail address I just selected in the From address but it keeps giving me the mailbox address of the original Sender ..

Is there a fix for this somehow since our addin relies on this to work. Maybe a workaround api or just an explanation on why the behaivor is different accorss platforms.

kumarshrey-msft commented 1 month ago

@aantimengocom Can you share the code snippet of your handler function. We are unable to repro this issue at our end.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.