You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version (e.g. 1.0, dev-master): 1.0.0
PHP version: 5.4.16
Microsoft Exchange version: 2019
Description of problem:
Hi there! I'm new to this project, I'd like to read a mailbox's calendar, and process the data. I've only tried an example so far,
but could not get it to work.
Example request:
// Formatted example request.require_once'/etc/vendor/autoload.php';
use \jamesiarmes\PhpEws\Client;
use \jamesiarmes\PhpEws\Request\FindItemType;
use \jamesiarmes\PhpEws\ArrayType\NonEmptyArrayOfBaseFolderIdsType;
use \jamesiarmes\PhpEws\Enumeration\DistinguishedFolderIdNameType;
use \jamesiarmes\PhpEws\Enumeration\ResponseClassType;
use \jamesiarmes\PhpEws\Type\ContactsViewType;
use \jamesiarmes\PhpEws\Type\DistinguishedFolderIdType;
$start_date = newDatetime('today -1 months');
$end_date = newDatetime('today +1 months');
$timezone = 'W. Europe Standard Time';
$host = 'webmail.site.eu';
$username = 'user';
$password = 'password';
$version = Client::VERSION_2016;
$client = newClient($host, $username, $password, $version);
$client->setTimezone($timezone);
$request = newFindItemType();
$request->ParentFolderIds = newNonEmptyArrayOfBaseFolderIdsType();
$request->ItemShape = newItemResponseShapeType();
$request->ItemShape->BaseShape = DefaultShapeNamesType::ALL_PROPERTIES;
$folder_id = newDistinguishedFolderIdType();
$folder_id->Id = DistinguishedFolderIdNameType::CALENDAR;
$request->ParentFolderIds->DistinguishedFolderId[] = $folder_id;
$request->Traversal = ItemQueryTraversalType::SHALLOW;
$request->CalendarView = newCalendarViewType();
$request->CalendarView->StartDate = $start_date->format('c');
$request->CalendarView->EndDate = $end_date->format('c');
$request->ConnectionTimeout = 60;
$response = $client->FindItem($request);
$response_messages = $response->ResponseMessages->FindItemResponseMessage;
foreach ($response_messagesas$response_message) {
$items = $response_message->RootFolder->Items->CalendarItem;
..
foreach ($itemsas$event){
$id = $event->ItemId->Id;
$subject = $event->Subject;
}
}
Example response:
PHPFatal error: Class'ItemResponseShapeType' not found in /etc/vendor/php-ews/php-ews/src/feff.php on line 34
// Formatted example response.
Additional details:
The text was updated successfully, but these errors were encountered:
Version (e.g. 1.0, dev-master): 1.0.0
PHP version: 5.4.16
Microsoft Exchange version: 2019
Description of problem:
Hi there! I'm new to this project, I'd like to read a mailbox's calendar, and process the data. I've only tried an example so far,
but could not get it to work.
Example request:
Additional details:
The text was updated successfully, but these errors were encountered: