Version (e.g. 1.0, dev-master):
PHP version: 8.1
Microsoft Exchange version: 2013 (if i assume correctly)
Description of problem:
Trying to create CalendarItem event in exchange calendar with user-provided data.
Simple ones and with partisipants working fine. But when I try to add recurrence in those events - nothing works. Watched similar questions here and on stackoverflow - they seem outdated. Tried to implement them with v1.0 classes - didnt work
What am I doing wrong?
Example request:
Tried daily and weekly recurrence.
$request = new CreateItemType();
$request->Items = new NonEmptyArrayOfAllItemsType();
//Event accembly---------------------------
$event = new CalendarItemType();
$event->Start = $eventData['startTime'];
$event->End = $eventData['endTime'];
$event->Subject = $eventData['subject'];
$event->Location = $eventData['location'];
//In case event is recurring---------------
if ($eventData['isRecurring']) {
$event->CalendarItemType = CalendarItemTypeType::RECURRING_MASTER;
$recurrence = new RecurrenceType();
switch ($eventData['recurrenceDetails']['type']) {
case 'daily':
$recurrence->DailyRecurrence = new DailyRecurrencePatternType();
$event->Recurrence = $recurrence;
break;
case 'weekly':
$weeklyRecurrenceInfo = new WeeklyRecurrencePatternType();
$weeklyRecurrenceInfo->Interval = $eventData['recurrenceDetails']['interval'];
$weeklyRecurrenceInfo->DaysOfWeek = new ArrayOfStringsType();
$weeklyRecurrenceInfo->DaysOfWeek = [DayOfWeekType::THURSDAY];
$recurrence->WeeklyRecurrence = $weeklyRecurrenceInfo;
$event->Recurrence = $recurrence;
break;
}
}
$eventBody = new BodyType();
$eventBody->_ = $eventData['description'];
$eventBody->BodyType = BodyTypeType::TEXT;
$event->Body = $eventBody;
$request->Items->CalendarItem[] = $event;
//--------------------------------------------
$request->SendMeetingInvitations = CalendarItemCreateOrDeleteOperationType::SEND_TO_NONE;
$response = $this->client->CreateItem($request);
return $response;
Example response:
Daily option leads to
local.ERROR: The request is invalid. {"userId":11,"exception":"[object] (SoapFault(code: 0 faultcode: a:ErrorInvalidRequest detail: {\"ResponseCode\":\"ErrorInvalidRequest\",\"Message\":\"The request is invalid.\"}): The request is invalid. at /var/www/html/vendor/php-ews/php-ews/src/Client.php:1631)
Version (e.g. 1.0, dev-master): PHP version: 8.1 Microsoft Exchange version: 2013 (if i assume correctly)
Description of problem: Trying to create CalendarItem event in exchange calendar with user-provided data. Simple ones and with partisipants working fine. But when I try to add recurrence in those events - nothing works. Watched similar questions here and on stackoverflow - they seem outdated. Tried to implement them with v1.0 classes - didnt work What am I doing wrong?
Example request:
Tried daily and weekly recurrence.
Example response:
Daily option leads to
Weekly to response with:
Additional details: