你如何使用php-ews检索与会者

时间:2015-06-08 07:29:25

标签: php outlook exchangewebservices

这是我使用的代码完美无缺的代码。我唯一挣扎的就是获得与会者的信息

(\\ban?d?\\b|\\bthe\\b|\\B&\\B|[\\d.]+)

1 个答案:

答案 0 :(得分:1)

未通过FindItems操作返回参加者,约会主体和许多其他属性,请参阅https://msdn.microsoft.com/en-us/library/bb508824.aspx。因此,您还需要在Appoointment上发出GetItem请求,例如

foreach ($events as $event) {
    $request = new EWSType_GetItemType();
    $request->ItemShape = new EWSType_ItemResponseShapeType();
    $request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;
    $request->ItemShape->BodyType = EWSType_BodyTypeResponseType::HTML;
    $request->ItemIds = new EWSType_NonEmptyArrayOfBaseItemIdsType();
    $request->ItemIds->ItemId = array();
    $event_item = new EWSType_ItemIdType();
    $event_item->Id = $event->ItemId->Id;
    $request->ItemIds->ItemId[] = $event_item;
    $response = $ews->GetItem($request);
    var_dump($response)
}

干杯 格伦