使用PHP-EWS访问其他邮箱日历事件

时间:2014-08-12 22:21:11

标签: php calendar exchangewebservices php-ews

在PHP-EWS库(https://github.com/jamesiarmes/php-ews)中,我可以使用以下代码访问特定用户的日历事件:https://github.com/jamesiarmes/php-ews/wiki/Calendar:-Get-List-(Retrieving-Id-and-ChangeKey) 在所有库功能中,我们始终对单个用户使用身份验证:

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

但是,如何从其他用户的邮箱中获取日历活动?如果我在LDAP中拥有具有管理员权限的帐户,是否可以使用PHP-EWS库从其他用户邮箱访问日历事件?或者是否只能访问身份验证中使用的用户帐户凭据的邮箱?

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

是否有人使用带有LDAP管理员帐户的PHP-EWS库从另一个用户邮箱访问日历事件?

谢谢。

1 个答案:

答案 0 :(得分:2)

下的代码块中只查看“日历文件夹”添加此内容以便从email@address.com的日历中检索事件:

$request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass;
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = 'email@address.com';
相关问题