email — хотите читать только непрочитанную почту из почтового ящика на сервере обмена в Stack Overflow

Я хочу читать только непрочитанную электронную почту с сервера обмена Outlook. ниже мой код. но он показывает всю электронную почту (чтение + непрочитанное) из папки «Входящие».

<?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->ItemShape = new EWSType_ItemResponseShapeType();
$request->ItemShape->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 = EWSType_ItemQueryTraversalType::SHALLOW;

$result = $ews->FindItem($request);
var_dump($result);
?>

пожалуйста, дайте мне знать, что я могу сделать. Я хочу читать только непрочитанную почту. после прочтения его следует пометить как прочитанное.

Заранее спасибо.

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector