• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/mail/multipart.php
  • Класс: BitrixMainMailMultipart
  • Вызов: Multipart::toStringBody
public function toStringBody()
{
	$count = count($this->parts);
	if ($count === 0)
	{
		return '';
	}
	elseif ($count === 1)
	{
		return  current($this->parts)->toStringBody();
	}


	$result = '';
	$boundary = $this->getBoundary();
	foreach ($this->parts as $part)
	{
		$result .= '--' . $boundary . $this->eol;
		$result .= (string) $part;
	}
	$result .= '--' . $boundary . '--' . $this->eol;

	return $result;
}