I am making this Microsoft Graph API call using PHP to get the MIME content of an email, but I'm not actually seeing any MIME content returned:
$graph = new Graph();
$graph->setAccessToken($accessToken);
try {
return $graph->createRequest("GET", '/users/' . $emailAddress . '/messages/' . $messageId . '/$value')->execute();
} catch (\Exception $e) {
print $e->getMessage();
}
What gets returned is this:
[_body:Microsoft\Graph\Http\GraphResponse:private] => GuzzleHttp\Psr7\Stream Object
(
...
)
[_decodedBody:Microsoft\Graph\Http\GraphResponse:private] => Array
(
)
[_headers:Microsoft\Graph\Http\GraphResponse:private] => Array
(
...headers (no mime content)...
)
[_httpStatusCode:Microsoft\Graph\Http\GraphResponse:private] => 200
[_request] => [[[data about the request]]]
What am I doing wrong? Why isn't it returning the MIME content of the message?