EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
email: skip html to markdown if no html
Yuri Kuznetsov5b7a4ec8f0c2
diff --git a/application/Espo/Entities/Email.php b/application/Espo/Entities/Email.phpindex 2be63a27c6..5774de34b0 100644--- a/application/Espo/Entities/Email.php+++ b/application/Espo/Entities/Email.php@@ -230,6 +230,10 @@ class Email extends Entityreturn $this->getFromContainer(self::ATTR_BODY_PLAIN);}+ if (!$this->isHtml()) {+ return $this->getBody();+ }+$body = $this->getBody() ?: '';return EmailUtil::stripHtml($body) ?: null;