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。