projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c7244ca
)
Mailer.php
author
Edward
<edward@roojs.com>
Tue, 24 Jul 2018 05:08:50 +0000
(13:08 +0800)
committer
Edward
<edward@roojs.com>
Tue, 24 Jul 2018 05:08:50 +0000
(13:08 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
e8cdb8f
..
334baa3
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-385,7
+385,23
@@
class Pman_Core_Mailer {
// this may raise parse errors as some html may be a component..
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
// this may raise parse errors as some html may be a component..
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
- print_r($imgs);exit;
+
+ $test = array();
+
+ foreach ($imgs as $i=>$img) {
+ $url = $img->getAttribute('src');
+ if (preg_match('#^cid:#', $url)) {
+ continue;
+ }
+ $me = $img->getAttribute('mailembed');
+ if ($me == 'no') {
+ continue;
+ }
+ $test[] = $url;
+ }
+
+ print_R($test);exit;
+
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
if (preg_match('#^cid:#', $url)) {
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
if (preg_match('#^cid:#', $url)) {