email: skip html to markdown if no html

This commit is contained in:
Yuri Kuznetsov
2025-07-10 16:05:21 +03:00
parent 19a09cc6d1
commit 5b7a4ec8f0
+4
View File
@@ -230,6 +230,10 @@ class Email extends Entity
return $this->getFromContainer(self::ATTR_BODY_PLAIN);
}
if (!$this->isHtml()) {
return $this->getBody();
}
$body = $this->getBody() ?: '';
return EmailUtil::stripHtml($body) ?: null;