Access another mailbox calendar events with PHP-EWS

╄→гoц情女王★ 提交于 2019-12-07 18:52:21

问题


In PHP-EWS library (https://github.com/jamesiarmes/php-ews) I can access the calendar events of a specific user using this code: https://github.com/jamesiarmes/php-ews/wiki/Calendar:-Get-List-(Retrieving-Id-and-ChangeKey) In all the library features we always use the authentication for a single user:

$ews = new ExchangeWebServices($host, $username, $password, $version);

However how can I get the calendar events from another user's mailbox? If I have an account in LDAP with admin privileges is it possible to access the calendar events from another user mailbox using the PHP-EWS library? Or is it only possible to access the mailbox of the user account credentials used in the authentication?

$ews = new ExchangeWebServices($host, $username, $password, $version);

Does anyone have an example to access the calendar events from another user mailbox using the PHP-EWS library with an LDAP admin account?

Thank you.


回答1:


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';


来源:https://stackoverflow.com/questions/25275060/access-another-mailbox-calendar-events-with-php-ews

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!