使用PHP-EWS访问其他邮箱日历事件 [英] Access another mailbox calendar events with 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 ,$ password,$ version);
但是如何从另一个用户的邮箱获取日历事件?如果我在具有管理员权限的LDAP中有帐户,可以使用PHP-EWS库从其他用户邮箱访问日历事件?或者只能访问认证中使用的用户帐户凭据的邮箱?
$ ews = new ExchangeWebServices host,$ username,$ password,$ version);
有没有人使用PHP-EWS库从另一个用户邮箱访问日历事件的示例
在只能查看calendars文件夹添加此项以从email@address.com的日历中检索活动:
$ request-> ParentFolderIds-> DistinguishedFolderId-> Mailbox = new StdClass;
$ request-> ParentFolderIds-> DistinguishedFolderId-> Mailbox-> EmailAddress ='email@address.com';
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.
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';
这篇关于使用PHP-EWS访问其他邮箱日历事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!