dp610807 2014-04-07 08:47
浏览 105

从资源邮箱PHP-EWS会议主题

Hi guys :) I am trying to take all meeting from resource meeting box, but when i try to take subject like this $subject = $event->Subject it displays name by whom meeting was created. $request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = "mail@domain.com" This is code how i select resource meeting box.

I want to take meeting subject by other way and i will be glad if you will help me :)

$request = new EWSType_FindItemType();
// Use this to search only the items in the parent directory in question or use ::SOFT_DELETED
// to identify "soft deleted" items, i.e. not visible and not in the trash can.
$request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;
// This identifies the set of properties to return in an item or folder response
$request->ItemShape = new EWSType_ItemResponseShapeType();
$request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;
// Define the timeframe to load calendar items
$request->CalendarView = new EWSType_CalendarViewType();
$request->CalendarView->StartDate ='2014-03-28T15:00:00+04:00';// an ISO8601 date e.g. 2012-06-12T15:18:34+03:00   "Y-m-d\TH:i:sO"
$request->CalendarView->EndDate = '2015-03-28T15:00:00+04:00';// an ISO8601 date later than the above    "Y-m-d\TH:i:sO"

// Only look in the "calendars folder"
$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();
$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = "meetingroom@gcfund.ge";

// Send request
$response = $ews->FindItem($request);
// Loop through each item if event(s) were found in the timeframe specified
if ($response->ResponseMessages->FindItemResponseMessage->RootFolder->TotalItemsInView > 0){
    $events = $response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->CalendarItem;


//       $db_selected = mysql_select_db('meeting_room',$con); 
//       $res=mysql_query("SELECT ID FROM meeting");
//       while($row = mysql_fetch_array($res)){
//       echo $row['ID'];
//       echo "<br>";
//       }
    foreach ($events as $event){

        $id = $event->ItemId->Id;
        $change_key = $event->ItemId->ChangeKey;
        $start = $event->Start;
        $end = $event->End;
        $subject = $event->Subject;
        $location = $event->Location;

This subject displays by whom meeting was created. I want this info too but i want Subject too.. Please Help :)

  • 写回答

1条回答 默认 最新

  • dpd2349 2014-10-14 04:24
    关注

    This is an issue with Exchange (not your code, or the PHP library, or EWS)

    Several blogs, such as this one: http://www.slipstick.com/exchange/cmdlets/meeting-organizers-name-appears-in-subject-line/ indicate that you can perform some PowerShell commands to change the Exchange server configuration. Note that if you change the configuration, it will apply for all new meetings/appointments added after the configuration change (existing meetings/appointments will stay as-is).

    If you don't have PowerShell access to the Exchange server but do have administrator access via another system, you might be able to achieve the same configuration change through the interface for that system. For example, on a Parallels hosted exchange system, login to Parallels as administrator, go to Exchange, go to Resource mailboxes, edit the room resource, and untick the "Add organizer to subject" checkbox under the "Resource scheduling" tab. As far as I can tell, this just performs the same PowerShell action behind the scenes.

    There may be similar options in other systems (e.g. Office 365) though I haven't looked into that.

    Having said all that, I have found that making this configuration change didn't help in my case: I created a new meeting against a room resource, however the subject ended up as "" (empty string) instead of the correct subject or the organiser's name. In any case, give the configuration change a try, as other people have apparently had success with it.

    评论

报告相同问题?

悬赏问题

  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序