projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process/Php7.php
[Pman.Core]
/
Mailer.php
diff --git
a/Mailer.php
b/Mailer.php
index
c4dce68
..
23fb875
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-373,7
+373,10
@@
class Pman_Core_Mailer {
'Subject: ' . @$email['headers']['Subject']
);
} else {
'Subject: ' . @$email['headers']['Subject']
);
} else {
- $pg->addEvent("COREMAILER-FAIL", false, $ret->toString());
+ $pg->addEvent("COREMAILER-FAIL", false,
+ "Sending to : " . ( is_array($rcpts) ? implode(', ', $rcpts) : $rcpts ) .
+ " Error: " . $ret->toString());
+
}
return $ret;
}
return $ret;
@@
-503,10
+506,14
@@
class Pman_Core_Mailer {
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$body = $dom->getElementsByTagName('body');
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$body = $dom->getElementsByTagName('body');
+ if (!empty($body->length)) {
+ $body->item(0)->setAttribute('class', $cls);
+ } else {
+ $body = $dom->createElement("body");
+ $body->setAttribute('class', $cls);
+ $dom->appendChild($body);
+ }
- $class = $dom->createAttribute('class');
- $class->value = $cls;
- $body->item(0)->appendChild($class);
return $dom->saveHTML();
}
return $dom->saveHTML();
}