• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/mail/part.php
  • Класс: BitrixMainMailPart
  • Вызов: Part::splitBody
protected function splitBody(&$body)
{
	if ($this->getHeader('Content-Transfer-Encoding') === 'base64')
	{
		return rtrim(chunk_split(base64_encode($body), 76, $this->eol));
	}
	elseif ($this->getHeader('Content-Transfer-Encoding') === 'quoted-printable')
	{
		return str_replace(
			$this->eol !== "rn" ? "=rn" : '',
			'=' . $this->eol,
			quoted_printable_encode($body)
		);
	}
	else
	{
		return preg_replace(
			'/(.{1,990})(?:s|$)|(.{990})/S',
			'$1$2' . $this->eol,
			$body
		);
	}
}