php-ews: Access shared calendars?

2020-07-29 17:18发布

Using php-ews: https://github.com/jamesiarmes/php-ews

I'm able to list events from my own calendar according to this example: https://github.com/jamesiarmes/php-ews/wiki/Calendar:-Get-List-(Retrieving-Id-and-ChangeKey) But after searching for a solution for a few hours I still haven't been able to find a way to access shared calendars.

This question is similar, but has no answer: EWS: Access shared calendars

From looking at that and various other search results (I've googled many variants of "ews shared calendar") I have to find the location of the shared calendar, get the id and then use that. But I haven't been able to do that. Can anyone help?

1条回答
SAY GOODBYE
2楼-- · 2020-07-29 18:09

In the code block under Only look in the "calendars folder" add this in order to retrieve events from email@address.com's calendar:

$request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass;
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = 'email@address.com';
查看更多
登录 后发表回答