Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Getting an attachements #740

@Cacus3

Description

@Cacus3

Hi, 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions