How do you get all unread mail in a users' exchange mailbox using PHP while using this class ?
I figured to first list a folders contents like this:
$ews = new ExchangeWebServices("mailserver.domain.local", "user", "pass");
$request = new EWSType_FindFolderType();
$request->FolderShape = new EWSType_FolderResponseShapeType();
$request->FolderShape->BaseShape = EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;
$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();
$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::INBOX;
$request->Traversal = new EWSType_FolderQueryTraversalType();
$result = $ews->FindFolder($request);
var_dump($result);
Only then I get this error:
Catchable fatal error: Object of class EWSType_FolderQueryTraversalType could not be converted to string
Is there anybody with experience with this class that can tell me what I'm doing wrong?
I do know that a string has to be passed, but it seems the class has just 3 constants without any functions or other properties..