I have a task at hand which requires me to connect Exchange Online account and list all the calendar entries in PHP.
I have read through many Microsoft help doc but it all refers to c# code. Can someone please guide me through steps to achieve this using PHP.
Try this:
$ews = new ExchangeWebServices($host, $username, $password);
$request = new EWSType_FindItemType();
$request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;
$request->ItemShape = new EWSType_ItemResponseShapeType();
$request->ItemShape->BaseShape =
EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;
$request->CalendarView = new EWSType_CalendarViewType();
$request->CalendarView->StartDate = date('c', strtotime('01/01/2011 -00'));
$request->CalendarView->EndDate = date('c', strtotime('01/31/2011 -00'));
$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->DistinguishedFolderId =
new EWSType_DistinguishedFolderIdType();
$request->ParentFolderIds->DistinguishedFolderId->Id =
EWSType_DistinguishedFolderIdNameType::CALENDAR;
With this: https://github.com/jamesiarmes/php-ews
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With