diff --git a/overrides/webklex/php-imap/src/Message.php b/overrides/webklex/php-imap/src/Message.php index f9938711f..248f88a19 100644 --- a/overrides/webklex/php-imap/src/Message.php +++ b/overrides/webklex/php-imap/src/Message.php @@ -372,6 +372,9 @@ public function hasTextBody(): bool { * @return mixed */ public function getTextBody() { + if (!$this->structure) { + $this->parseRawBody($this->tmp_raw_body); + } if (!isset($this->bodies['text'])) { return null; } @@ -385,6 +388,9 @@ public function getTextBody() { * @return bool */ public function hasHTMLBody(): bool { + if (!$this->structure) { + $this->parseRawBody($this->tmp_raw_body); + } return isset($this->bodies['html']) && $this->bodies['html'] !== ""; } @@ -394,6 +400,9 @@ public function hasHTMLBody(): bool { * @return string|null */ public function getHTMLBody() { + if (!$this->structure) { + $this->parseRawBody($this->tmp_raw_body); + } if (!isset($this->bodies['html'])) { return null; }