{"action":"created","issue":{"url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/113","repository_url":"https://api.github.com/repos/gautamsi/ews-javascript-api","labels_url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/113/comments","events_url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/113/events","html_url":"https://github.com/gautamsi/ews-javascript-api/issues/113","id":186158690,"number":113,"title":"Can't get item body text","user":{"login":"guderkar","id":22962839,"avatar_url":"https://avatars.githubusercontent.com/u/22962839?v=3","gravatar_id":"","url":"https://api.github.com/users/guderkar","html_url":"https://github.com/guderkar","followers_url":"https://api.github.com/users/guderkar/followers","following_url":"https://api.github.com/users/guderkar/following{/other_user}","gists_url":"https://api.github.com/users/guderkar/gists{/gist_id}","starred_url":"https://api.github.com/users/guderkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guderkar/subscriptions","organizations_url":"https://api.github.com/users/guderkar/orgs","repos_url":"https://api.github.com/users/guderkar/repos","events_url":"https://api.github.com/users/guderkar/events{/privacy}","received_events_url":"https://api.github.com/users/guderkar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-10-30T19:56:13Z","updated_at":"2016-11-10T15:21:08Z","closed_at":"2016-11-03T14:22:14Z","body":"``` javascript\nvar items = exch.FindItems(ews.WellKnownFolderName.Inbox, new ews.ItemView());\nitems.then(function(response) {\n    for (var item of response.Items)\n    {\n        console.log(item.Subject);\n        console.log(item.Body.Text);\n        console.log(\"------------------------------------\");\n    }\n});\n```\n\nHi I'm trying to get subject and body from inbox. Getting subject is perfectly OK but I can't get the body.\n"},"comment":{"url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/comments/259717357","html_url":"https://github.com/gautamsi/ews-javascript-api/issues/113#issuecomment-259717357","issue_url":"https://api.github.com/repos/gautamsi/ews-javascript-api/issues/113","id":259717357,"user":{"login":"guderkar","id":22962839,"avatar_url":"https://avatars.githubusercontent.com/u/22962839?v=3","gravatar_id":"","url":"https://api.github.com/users/guderkar","html_url":"https://github.com/guderkar","followers_url":"https://api.github.com/users/guderkar/followers","following_url":"https://api.github.com/users/guderkar/following{/other_user}","gists_url":"https://api.github.com/users/guderkar/gists{/gist_id}","starred_url":"https://api.github.com/users/guderkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guderkar/subscriptions","organizations_url":"https://api.github.com/users/guderkar/orgs","repos_url":"https://api.github.com/users/guderkar/repos","events_url":"https://api.github.com/users/guderkar/events{/privacy}","received_events_url":"https://api.github.com/users/guderkar/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T15:21:08Z","updated_at":"2016-11-10T15:21:08Z","body":"EDIT: I just noticed that the above solution with bluebird somehow skipping the first item. So\r\n\r\n```javascript\r\nvar Promise = require('bluebird');\r\nvar items = exch.FindItems(ews.WellKnownFolderName.Inbox, new ews.ItemView(1));\r\nitems.then(function(response) {\r\n    Promise.reduce(response.Items,function(totalNotUsed, item){\r\n        return item.Load().then(function() {\r\n        console.log(item.Subject);\r\n        console.log(item.Body.Text);\r\n\t    console.log(\"------------------------------------\\n\");\r\n        return null;\r\n        });\r\n    }).then(function(totalNotUsed){\r\n        //all done\r\n    });\r\n});\r\n```\r\ngives an empty output."}}
{"actor":{"display_login":"guderkar"}}