[英]How to get User's actual Email Id in Outlook Add-in Integration
我已經集成創建了一個加載項以集成到 Outlook 郵件中。
我為此使用了 Office 內置代碼(Javascript 代碼)。
現在要測試加載項,我已使用我的個人電子郵件 ID 在 Microsoft 中注冊。注冊后,我發現在 Outlook 郵件中,配置文件中有兩個不同的郵件 ID。
喜歡
現在我需要第一個進行驗證,但我每次都得到第二個。
我為此使用了以下代碼。
Office.initialize = function (reason) {
item = Office.context.mailbox.item;
console.log(Office.context.mailbox.userProfile.displayName);
console.log(Office.context.mailbox.userProfile.emailAddress);
}
請建議我一些其他方式來獲取用戶的電子郵件 ID。
Outlook JavaScript API ( https://dev.office.com/docs/add-ins/develop/understanding-the-javascript-api-for-office#mailbox-object ) 的文檔暗示您的代碼僅在僅公開該特定郵箱數據的郵箱上下文,因此您無法訪問有關其他郵箱的任何信息。
我進行了快速搜索,但我認為無法枚舉與郵箱關聯的電子郵件地址,也無法枚舉有關桌面 Outlook 中其他郵箱或 OWA 等效項的信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.