1

We're on exchange 2007 and I'm using php-ews and I want to get a list of all the bookings for a room resource. By room resource, I mean the rooms button in outlook when creating a meeting invite.

The code I have so far returns items from my calendar but I need calendar from 'Conference room A'. Anyone have done this?

$host = 'mailhost';
$username = 'xxxx';
$password = 'xxxx';
$mail = 'xxxx';
$startDateEvent = "2013-01-14T09:00:00";
$endDateEvent = "2013-09-20T17:00:00";

$ews = new ExchangeWebServices($host, $username, $password);
$request = new EWSType_FindItemType();
$request->Traversal = EWSType_FolderQueryTraversalType::SHALLOW;

$request->CalendarView->StartDate = $startDateEvent; 
$request->CalendarView->EndDate = $endDateEvent; 
$request->CalendarView->MaxEntriesReturned = 100;
$request->CalendarView->MaxEntriesReturnedSpecified = true;
$request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;

$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;   
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = $mail;
$response = $ews->FindItem($request);
echo '<pre>'.print_r($response, true).'</pre>';
4

2 回答 2

1

我什至迟到了比赛。但是我解决这个问题的方法是在房间名称之后创建一个交换帐户,例如 boardroom@。

然后,每当他们发出会议请求时,我都会让人们在 boardroom@ 中进行复制。我的脚本只是询问 boardroom@ 的日历。组织中的每个人都有一份只读模式的会议室日历副本,他们可以查看该副本以查看该周的所有会议。

我的软件是用于房间外的一个显示标志,根据这个日历显示房间是否在使用中。

于 2015-12-17T08:13:44.880 回答
0

比赛迟到了,但也许这会对某人有所帮助....

基本上,php-ews 从未添加过该GetRooms操作。您可以修改您的应用程序以通过 ldap 执行房间查找(假设您的房间存在于 AD 中),然后使用每个房间的电子邮件地址并使用模拟查询其日历。

在这里查看我的答案... https://stackoverflow.com/a/23815914/2979715

于 2014-05-22T20:12:50.297 回答