• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/mailingchain.php
  • Класс: BitrixSenderMailingChainTable
  • Вызов: MailingChainTable::prepareReSendErrorRecipients
static function prepareReSendErrorRecipients($id)
{
	if(!static::canReSendErrorRecipients($id))
	{
		return;
	}

	$mailingChain = static::getRowById(array('ID' => $id));
	$updateSql = 'UPDATE ' . PostingRecipientTable::getTableName() .
		" SET STATUS='" . PostingRecipientTable::SEND_RESULT_NONE . "'" .
		" WHERE POSTING_ID=" . intval($mailingChain['POSTING_ID']) .
		" AND STATUS='" . PostingRecipientTable::SEND_RESULT_ERROR . "'";
	Application::getConnection()->query($updateSql);
	ModelPostingTable::update($mailingChain['POSTING_ID'], ['STATUS' => PostingTable::STATUS_PART]);
	static::update(array('ID' => $id), array('STATUS' => static::STATUS_SEND));
}