$pg = $ff->page;
- $ts = microtime(true);
-
$email = is_array($email) ? $email : $this->toData();
- $diff = microtime(true) - $ts;
-
- print_r($diff);exit;
-
if (is_a($email, 'PEAR_Error')) {
$pg->addEvent("COREMAILER-FAIL", false, "email toData failed");
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
+ $urls = array();
+
+ foreach ($imgs as $i=>$img) {
+ $url = $img->getAttribute('src');
+ if (preg_match('#^cid:#', $url)) {
+ continue;
+ }
+ $me = $img->getAttribute('mailembed');
+ if ($me == 'no') {
+ continue;
+ }
+
+ if(!array_key_exists($url, $urls)){
+ $conv = $this->fetchImage($url);
+ $this->images[$conv['contentid']] = $conv;
+ } else {
+ $conv = $urls[$url];
+ }
+
+
+ }
+
+ print_R($test);exit;
+
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
if (preg_match('#^cid:#', $url)) {