Reputation: 1753
Is there any way to get a valid URL to directly navigate to an email? I'm using Office.js v1.1
Right now, I'm creating it manually:
const defaultOutlookDomain = 'https://outlook.office.com/';
const domain = document.referrer || defaultOutlookDomain;
const emailURL = itemID => new URL('/owa/#ItemID=' + encodeURIComponent(itemID), domain);
//Usage
const url = emailURL(Office.context.mailbox.item.itemId);
Definitely this is not a perfect solution, but it's working fine for me on desktop/web platforms. The point is that on mobile platforms (Android/iOS) the itemId is sightly different, and the URL I construct is not valid.
On desktop, the itemId is composed using base64 (alphanumeric, '+', '/') while mobile one contains '-' and '_' instead of '/' and '+'
Upvotes: 1
Views: 1041
Reputation:
Currently, constructing a URL from the itemId, you requested, is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.
[Outlook Add-ins Engineering Team]
Upvotes: 1