A Working Example Of Getting The Message Body
Opened this issue · 4 comments
I understand that in order to get the message body I need to make a second request but after spending a few hours trying to find a working example, none I've found work. Can we please get an example of how to get the message body with the correct library use clauses?
@GravisTechRyan - you ever figure this out? Same issue here.
@willbonde I wasn't able to get this one working. I switched to this project and its works easily: https://github.com/Garethp/php-ews
Same problem here - i consider switching to the mentioned lib. But maybe you guys have another idea?
managed to get the email body
$request = new \jamesiarmes\PhpEws\Request\GetItemType();
$request->ItemShape = new \jamesiarmes\PhpEws\Type\ItemResponseShapeType();
$request->ItemShape->BaseShape = \jamesiarmes\PhpEws\Enumeration\DefaultShapeNamesType::ALL_PROPERTIES;
$request->ItemIds = new \jamesiarmes\PhpEws\ArrayType\NonEmptyArrayOfBaseItemIdsType();
$item = new \jamesiarmes\PhpEws\Type\ItemIdType();
$item->Id = $messageId;
$item->ChangeKey = $changeKey;
$request->ItemIds->ItemId[] = $item;
$response = $client->GetItem($request);