Mailer.php
[Pman.Core] / Mailer.php
index e1985bf..9daa52a 100644 (file)
@@ -455,6 +455,7 @@ class Pman_Core_Mailer {
     
     function htmlbodyInlineCss($html)
     {
+        print_R($html);exit;
         $dom = new DOMDocument();
         
         @$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
@@ -465,7 +466,7 @@ class Pman_Core_Mailer {
         
         if(!$head->length){
             $head = $dom->createElement('head');
-            $html->item(0)->insertBefore($head, $html->item(0));
+            $html->item(0)->insertBefore($head, $body->item(0));
             $head = $dom->getElementsByTagName('head');
         }