projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4961a78
)
Mailer.php
author
edward
<edward@roojs.com>
Mon, 26 Mar 2018 06:17:57 +0000
(14:17 +0800)
committer
edward
<edward@roojs.com>
Mon, 26 Mar 2018 06:17:57 +0000
(14:17 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
ca3160d
..
92f8b5c
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-459,7
+459,14
@@
class Pman_Core_Mailer {
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
- $body = $dom->getElementsByTagName('body');
+ $html = $dom->getElementsByTagName('html');
+
+ $head = $dom->getElementsByTagName('head');
+
+ if(!$head->length){
+ $head = $dom->createElement('head');
+ $html->item(0)->appendChild($head);
+ }
$s = $dom->createElement('style');
$e = $dom->createTextNode($this->css_inline);