- Модуль: mail
- Путь к файлу: ~/bitrix/modules/mail/lib/helper/messageeventmanager.php
- Класс: BitrixMailHelperMessageEventManager
- Вызов: MessageEventManager::getMailMessagesList
protected function getMailMessagesList($filter, $selectingFields)
{
$dateLastMonth = new DateTime();
$dateLastMonth->add('-1 MONTH');
foreach ($selectingFields as $index => $selectingField)
{
if (strncmp('MAILBOX_', $selectingField, 8) === 0)
{
$selectingFields[$selectingField] = 'MAILBOX.'.mb_substr($selectingField, 8);
unset($selectingFields[$index]);
}
}
return MailMessageUidTable::getList([
'select' => $selectingFields,
'filter' => array_merge($filter, [
'>=INTERNALDATE' => $dateLastMonth,
'==DELETE_TIME' => 0,
]),
]
)->fetchAll();
}