• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/mail/mail.php
  • Класс: BitrixMainMailMail
  • Вызов: Mail::hasImageAttachment
public function hasImageAttachment($checkRelated = false)
{
	if (!$this->hasAttachment())
	{
		return false;
	}

	$files = $this->attachment;
	if(is_array($this->filesReplacedFromBody))
	{
		$files = array_merge($files, array_values($this->filesReplacedFromBody));
	}

	foreach($files as $attachment)
	{
		if ($this->isAttachmentImage($attachment, $checkRelated))
		{
			return true;
		}
	}

	return false;
}