• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/dispatch/state.php
  • Класс: BitrixSenderDispatchState
  • Вызов: State::sendErrors
public function sendErrors()
{
	if (!$this->canSendErrors())
	{
		throw new InvalidOperationException('Can not resend error letters.');
	}

	$postingId = $this->letter->get('POSTING_ID');
	$updateSql = 'UPDATE ' . PostingRecipientTable::getTableName() .
		" SET STATUS='" . PostingRecipientTable::SEND_RESULT_NONE . "'" .
		" WHERE POSTING_ID=" . intval($postingId) .
		" AND STATUS='" . PostingRecipientTable::SEND_RESULT_ERROR . "'";
	Application::getConnection()->query($updateSql);
	PostingSender::updateActualStatus($this->letter->get('POSTING_ID'));

	return $this->updateStatus(ModelLetterTable::STATUS_SEND, self::SENDING);
}