我已集成创建了一个要集成到 Outlook 邮件中的加载项。
我为此使用了 Office 内置代码(Javascript 代码)。
现在要测试加载项,我使用我的个人电子邮件 ID 在 Microsoft 中注册。注册后,我发现在 Outlook 邮件中,配置文件中有两个不同的邮件 ID。
喜欢
- alex.p@***.com
- outlook_1203434@outlook.com
现在我需要第一个进行验证,但我每次都得到第二个。
我为此使用了下面的代码。
Office.initialize = function (reason) {
item = Office.context.mailbox.item;
console.log(Office.context.mailbox.userProfile.displayName);
console.log(Office.context.mailbox.userProfile.emailAddress);
}
请建议我使用其他方法来获取用户的电子邮件 ID。