I am retrieving messages from an Outlook account. I am trying to get inline files and attachments from those messages.
$graph = new Graph();
$graph->setAccessToken($this->getAccessToken());
$messageQueryParams = array (
"\$select" => "subject,receivedDateTime,from,sentDateTime,body,toRecipients,sender,uniqueBody,ccRecipients,bccRecipients,attachments",
"\$orderby" => "receivedDateTime DESC",
"\$top" => "200"
);
$url = '/me/mailfolders/' . $folder . '/messages/delta';
$url_combiner = '?';
$getMessagesUrl = $url . $url_combiner . http_build_query($messageQueryParams);
$response = $graph->createRequest('GET', $getMessagesUrl)->execute();
$messages = $response->getResponseAsObject( \Microsoft\Graph\Model\Message::class );
foreach($messages as $msg) {
echo $msg->getHasAttachments();
}
This code returns 'null' for $msg->getHasAttachments(); I would expect it to return a true or false.
The messages I am downloading from this folder have both inline attachments and mail attachments, so I am looking for a solution to both.
(Responses that point to specific points in the MS Graph PHP SDK documentation are very appreciated.)
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)