want to read only unread mail from inbox in exchange server in PHP
<p>i want to read only unread email from outlook exchange server. below is my code. but it is showing all email(read+unread) from inbox.</p>

<pre><code>&lt;?php
require_once ('../mail3/php-ews-master/ExchangeWebServices.php');
require_once ('../mail3/php-ews-master/EWS_Exception.php');
require_once ('../mail3/php-ews-master/EWSType.php');
require_once ('../mail3/php-ews-master/NTLMSoapClient.php');

function __autoload($class_name)
{
// Start from the base path and determine the location from the class name,
$base_path = '../mail3/php-ews-master';
$include_file = $base_path . '/' . str_replace('_', '/', $class_name) . '.php';

return (file_exists($include_file) ? require_once $include_file : false);
}

//$message_id = ''; // Id of the email message
$ews = new ExchangeWebServices("webmail.bangla.com", "dd.test",  "************",ExchangeWebServices::VERSION_2010);

$request = new EWSType_FindItemType();
$request-&gt;ItemShape = new EWSType_ItemResponseShapeType();
$request-&gt;ItemShape-&gt;BaseShape = EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;

$request-&gt;ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request-&gt;ParentFolderIds-&gt;DistinguishedFolderId = new  EWSType_DistinguishedFolderIdType();
$request-&gt;ParentFolderIds-&gt;DistinguishedFolderId-&gt;Id = EWSType_DistinguishedFolderIdNameType::INBOX;

$request-&gt;Traversal = EWSType_ItemQueryTraversalType::SHALLOW;

$result = $ews-&gt;FindItem($request);
var_dump($result);
?&gt;
</code></pre>

<p>please let me know what can i do. i want to read only unread mail. after reading it should be mark as read.</p>

<p>Thanks in advance.</p>