Mailer.php
[Pman.Core] / Mailer.php
index be641ce..700fd17 100644 (file)
@@ -494,13 +494,18 @@ class Pman_Core_Mailer {
     
     function htmlbodySetClass($html, $cls)
     {
+        print_R('run???');exit;
         $dom = new DOMDocument();
         
         @$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
         
         $body = $dom->getElementsByTagName('body');
         
+        $class = $dom->createAttribute('class');
+        $class->value = $cls;
+        $body->item(0)->appendChild($class);
         
+        return $dom->saveHTML();
     }
     
     function fetchImage($url)