diff --git a/application/Espo/Entities/Email.php b/application/Espo/Entities/Email.php index 2be63a27c6..5774de34b0 100644 --- a/application/Espo/Entities/Email.php +++ b/application/Espo/Entities/Email.php @@ -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;