15 $option[
'steps'] = Mail\MailMessageTable::getCount(array(
16 '<=ID' => $option[
'lastId'] > 0 ? $option[
'lastId'] : 0,
18 $option[
'count'] = Mail\MailMessageTable::getCount();
20 if ($option[
'steps'] >= $option[
'count'])
25 $res = Mail\MailMessageTable::getList(array(
28 'FIELD_FROM',
'FIELD_REPLY_TO',
29 'FIELD_TO',
'FIELD_CC',
'FIELD_BCC',
30 'MAILBOX_USER_ID' =>
'MAILBOX.USER_ID',
33 '>ID' => $option[
'lastId'] > 0 ? $option[
'lastId'] : 0,
35 'order' => array(
'ID' =>
'ASC'),
41 while ($item = $res->fetch())
44 $option[
'lastId'] = $item[
'ID'];
55 if (count($contacts) >= 100)