12 public function execute(array &$option): bool
16 $option[
'lastId'] = 0;
17 $maxId = Mail\MailMessageTable::getList([
18 'order' => [
'ID' =>
'DESC'],
22 $option[
'maxId'] = (int) $maxId[
'ID'];
25 if ($option[
'lastId'] >= $option[
'maxId'])
30 $result = Mail\MailMessageTable::getList([
36 '><ID' => [max($option[
'lastId'], 0),$option[
'maxId']],
38 'order' => [
'ID' =>
'ASC'],
39 'limit' => self::LIMIT,
42 while ($message = $result->fetch())
44 $message[
'SEARCH_CONTENT'] = self::isolateBase64Files(str_rot13($message[
'SEARCH_CONTENT']));
45 Mail\MailMessageTable::update($message[
'ID'], [
46 'SEARCH_CONTENT' => $message[
'SEARCH_CONTENT'],
49 $option[
'lastId'] = $message[
'ID'];