0
outlookClient.me.folders.getFolder('Inbox').messages.getMessages().filter('IsRead eq false and HasAttachments eq true').fetchAll(10).then(function (result) {
result.forEach(function (message) {
    message.attachments.getAttachments().fetchAll(100).then(function (attachmentResult) {
        console.log('Message "' + message.subject + '" contains ' + attachmentResult.length + ' attachment(s)');
        attachmentResult.forEach(function (attachment) {
          console.log('*    "' + attachment.name + '" (' + attachment.size + ' KB)');

        });
    });
});

});

在上面的代码中,我能够获取除 ContentBytes 之外的附件的所有详细信息,请建议我如何获取附件的 ContentBytes。

4

1 回答 1

0

contentBytes属性仅适用于 类型的附件FileAttachment。如果它是ItemAttachment那个属性将是未定义的。否则我相信它应该作为attachment.contentBytes.

于 2015-08-10T15:55:56.480 回答