如果我通过 API 调用添加电子邮件,如何摆脱以太网 Outlook 中的尖括号?
我有问题。将我的加载项添加到在线Outlook之后,自动添加了Sidebar的电子邮件。 电子邮件的名字有额外的命名。 例如: 电子邮件:
> <
我在加载项中使用office.app.js,以防万一
function _getMailItem() {
return Office.context.mailbox.item;
}
function addRecipientPortion(listName, emails) {
var deferred = $q.defer();
var mailItem = _getMailItem();
var recipientList = mailItem[listName];
recipientList.addAsync(emails.slice(0, 100), function (asyncResult) {
if (asyncResult.error) {
deferred.reject(asyncResult.error);
} else {
deferred.resolve();
}
})
return deferred.promise;
}
电子邮件acording文档必须是字符串的数组,但是如果它们是ablover,则会增加错误。
中,它不起作用。
I have question. After adding my add-in to online outlook what auto adds emails from sidebar.
Emails have extra naming in their names.
For example:
email: [email protected]
in cc field will be - [email protected]<[email protected]>
Question is why outlook added this extra <[email protected]>
stuff to email?
How to remove them if I am adding them by api calls?
I am using office.app.js in my add-in just in case
function _getMailItem() {
return Office.context.mailbox.item;
}
function addRecipientPortion(listName, emails) {
var deferred = $q.defer();
var mailItem = _getMailItem();
var recipientList = mailItem[listName];
recipientList.addAsync(emails.slice(0, 100), function (asyncResult) {
if (asyncResult.error) {
deferred.reject(asyncResult.error);
} else {
deferred.resolve();
}
})
return deferred.promise;
}
emails acording documentation must be array of string but if they are it rises error.
if emails are in this format it works fine but it did not work in desktop outlook
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
长话短说,你不能。错误是在桌面Outlook中需要将额外的PRM(
displayName
)添加到包含电子邮件的对象(在此之前仅包含emailAddress
prm)。请注意!

如果
emailAddress
和displayName
具有相同的值,则在在线Outlook中,电子邮件将在三角形括号中。像这样 -“/cdn-cgi/l/电子邮件保护” class =“ __ cf_email__” data-cfemail =“ 630E1A23060E020A020A0F4D000C0E”> [email&nbsp; protiveed] &gt;
Long story short you can not. The bug was that in Desktop outlook need to add extra prm(
displayName
) to the object what contain email (before that it contained onlyemailAddress
prm).BE AWARE!

If
emailAddress
anddisplayName
have same values then in online outlook the email will be in triangle brackets. Like so -[email protected]<[email protected]>