protected function getMessageType()
{
$type = null;
$numAttach = count($this->mail->getAttachments());
if ($numAttach > 0 && null === $this->html && null === $this->text) {
$type = null;
} else {
if ($numAttach > 0 && null !== $this->html && null !== $this->text) {
$type = self::TEXT_HTML_FILE;
} else {
if ($numAttach > 0 && null !== $this->html) {
$type = self::HTML_FILE;
} else {
if ($numAttach > 0 && null !== $this->text) {
$type = self::TEXT_FILE;
} else {
if (null !== $this->html && null !== $this->text) {
$type = self::TEXT_HTML;
} else {
if (null !== $this->html) {
$type = self::HTML;
} else {
if (null !== $this->text) {
$type = self::TEXT;
}
}
}
}
}
}
}
return $type;
}