im trying to download an attachments but im stuck on example im docs.
im tried to use examlpe from https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item?view=outlook-js-preview and translate it to java. i got
ExchangeService service = new ExchangeService(); ExchangeCredentials credentials = new TokenCredentials(requset.attachmentToken); service.setCredentials(credentials); service.setUrl(new URI(requset.ewsUrl)); String[] arr = (String[]) requset.attachmentsID.toArray(); service.getAttachments(arr, null, new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.MimeContent));
in docs service.getAttachments take array of string (ID's) but here a need to pass Attachment[] how to get an array of attachments before gets them from api?
Im using a https://github.com/OfficeDev/ews-java-api
1.4m articles
1.4m replys
5 comments
57.0k users