Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过Outlook中的php ews设置类别颜色_Php_Outlook_Exchangewebservices_Php Ews - Fatal编程技术网

通过Outlook中的php ews设置类别颜色

通过Outlook中的php ews设置类别颜色,php,outlook,exchangewebservices,php-ews,Php,Outlook,Exchangewebservices,Php Ews,您好,我目前正在学习如何在创建或更新日历事件时通过php ews设置类别颜色 我正在使用exchange 2013服务器 请参见下面的基本示例: <?php $ews = new ExchangeWebServices($host, $username, $password, $version); // Start building the request. $request = new EWSType_CreateItemType(); $request->Items = new

您好,我目前正在学习如何在创建或更新日历事件时通过php ews设置类别颜色

我正在使用exchange 2013服务器

请参见下面的基本示例:

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

// Start building the request.
$request = new EWSType_CreateItemType();
$request->Items = new EWSType_NonEmptyArrayOfAllItemsType();
$request->Items->CalendarItem = new EWSType_CalendarItemType();

// Set the subject.
$request->Items->CalendarItem->Subject = 'Basic Calendar Item Insertion';

// Set the start and end times.
$date = new DateTime('8:00 AM');
$request->Items->CalendarItem->Start = $date->format('c');
$date->modify('+1 hour');
$request->Items->CalendarItem->End = $date->format('c');

// Set no reminders
$request->Items->CalendarItem->ReminderIsSet = false;

// Or use this to specify when reminder is displayed (if this is not set, the default is 15 minutes)
$request->Items->CalendarItem->ReminderMinutesBeforeStart = 15;

// Build the body.
$request->Items->CalendarItem->Body = new EWSType_BodyType();
$request->Items->CalendarItem->Body->BodyType = EWSType_BodyTypeType::HTML;
$request->Items->CalendarItem->Body->_ = 'This is <b>the</b> body';

// Set the item class type (not required).
$request->Items->CalendarItem->ItemClass = new EWSType_ItemClassType();
$request->Items->CalendarItem->ItemClass->_ = EWSType_ItemClassType::APPOINTMENT;

// Set the sensativity of the event (defaults to normal).
$request->Items->CalendarItem->Sensitivity = new EWSType_SensitivityChoicesType();
$request->Items->CalendarItem->Sensitivity->_ = EWSType_SensitivityChoicesType::NORMAL;

// Add some categories to the event.
$request->Items->CalendarItem->Categories = new EWSType_ArrayOfStringsType();
$request->Items->CalendarItem->Categories->String = array('Testing', 'php-ews');

// Set the importance of the event.
$request->Items->CalendarItem->Importance = new EWSType_ImportanceChoicesType();
$request->Items->CalendarItem->Importance->_ = EWSType_ImportanceChoicesType::NORMAL;

// Don't send meeting invitations.
$request->SendMeetingInvitations = EWSType_CalendarItemCreateOrDeleteOperationType::SEND_TO_NONE;

$response = $ews->CreateItem($request);

类别的颜色取决于主类别列表,主类别列表是每个邮箱的配置项。您可以使用EWS访问/设置它们,请参见,但这是基于每个邮箱进行的

干杯
Glen

类别的颜色取决于主类别列表,主类别列表是每个邮箱的配置项。您可以使用EWS访问/设置它们,请参见,但这是基于每个邮箱进行的

干杯
Glen

类别的颜色取决于主类别列表,主类别列表是每个邮箱的配置项。您可以使用EWS访问/设置它们,请参见,但这是基于每个邮箱进行的

干杯
Glen

类别的颜色取决于主类别列表,主类别列表是每个邮箱的配置项。您可以使用EWS访问/设置它们,请参见,但这是基于每个邮箱进行的

干杯
格伦

谢谢格伦。因此,我必须使用PHPEWS库完成这项工作。至少我已经找到了一个关于如何获得日历颜色的方法。谢谢格伦。因此,我必须使用PHPEWS库完成这项工作。至少我已经找到了一个关于如何获得日历颜色的方法。谢谢格伦。因此,我必须使用PHPEWS库完成这项工作。至少我已经找到了一个关于如何获得日历颜色的方法。谢谢格伦。因此,我必须使用PHPEWS库完成这项工作。至少我已经找到了一个关于如何获得日历颜色的方法。