From b8dcbdf0ad61e04c1b936412683206fcbae760bc Mon Sep 17 00:00:00 2001 From: edward Date: Mon, 26 Mar 2018 17:11:00 +0800 Subject: [PATCH] Mailer.php --- Mailer.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Mailer.php b/Mailer.php index 9202b532..cee5d128 100644 --- a/Mailer.php +++ b/Mailer.php @@ -172,7 +172,7 @@ class Pman_Core_Mailer { // var_dump($htmlbody);exit; if($content->body_cls && strlen($content->body_cls)){ - $htmlbody = $this->htmlbodySetClass($htmlbody, $content->body_cls); +// $htmlbody = $this->htmlbodySetClass($htmlbody, $content->body_cls); } if ($this->replaceImages) { @@ -494,17 +494,17 @@ class Pman_Core_Mailer { function htmlbodySetClass($html, $cls) { -// $dom = new DOMDocument(); -// -// @$dom->loadHTML('' .$html); -// -// $body = $dom->getElementsByTagName('body'); -// -// $class = $dom->createAttribute('class'); -// $class->value = $cls; -// $body->item(0)->appendChild($class); -// -// return $dom->saveHTML(); + $dom = new DOMDocument(); + + @$dom->loadHTML('' .$html); + + $body = $dom->getElementsByTagName('body'); + + $class = $dom->createAttribute('class'); + $class->value = $cls; + $body->item(0)->appendChild($class); + + return $dom->saveHTML(); } function fetchImage($url) -- 2.39.2