From: edward Date: Mon, 26 Mar 2018 08:49:33 +0000 (+0800) Subject: Mailer.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=393a062d59fed8daf40a3a5e165c4900db1879a3 Mailer.php --- diff --git a/Mailer.php b/Mailer.php index 27fb82fa..f51c5274 100644 --- a/Mailer.php +++ b/Mailer.php @@ -455,6 +455,31 @@ class Pman_Core_Mailer { function htmlbodyInlineCss($html) { + require_once 'HTML/CSS/InlineStyle.php'; + + $doc = new HTML_CSS_InlineStyle($html); + + $htmldoc->applyStylesheet($this->css_inline); + + $html = $htmldoc->getHTML(); + +// libxml_use_internal_errors (false); +// +// if (!function_exists('tidy_repair_string')) { +// return "INSTALL TIDY ON SERVER " . $html; +// } +// +// $html = tidy_repair_string( +// $html, +// array( +// 'indent' => TRUE, +// 'output-xhtml' => TRUE, +// 'wrap' => 120 +// ), +// 'UTF8' +// ); + + return $html; // $dom = new DOMDocument(); //