function attachmentIds()
{
-
- $roo = HTML_FlexyFramework::get()->page;
-
libxml_use_internal_errors (true);
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->loadHTML('<?xml encoding="UTF-8">'.$this->bodytext);
}
$ret[] = $cid[1];
}
- // print_r($ret);
+
return $ret;
}
/**
$r = new Pman_Core_Mailer(array(
'template'=> $this->tableName() . '-' . $this->id,
'templateDir' => $templateDir,
- 'page' => $q,
+ 'page' => $this,
'contents' => $contents
));
function cachedMailWithOutImages($force = false, $replace_links = true)
{
+ $random_hash = md5(date('r', time()));
+
+ $this->cachedImages($random_hash);
+
$cachePath = session_save_path() . '/email-cache-' . getenv('APACHE_RUN_USER') . '/mail/' . $this->tableName() . '-' . $this->id . '.txt';
if (!$force && $this->isGenerated($cachePath)) {
))."\n");
- $random_hash = md5(date('r', time()));
-
// note the extra space to finish the last line..
fwrite($fh, " " . "
Content-Type: multipart/alternative; boundary=alt-{$random_hash}
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
-{$message->plaintext}
+{$this->plaintext}
--alt-{$random_hash}
Content-Type: multipart/related; boundary=rel-{$random_hash}
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
-{$message->bodytext}
+{$this->bodytext}
");
--alt-{$random_hash}--
");
fclose($fh);
-
- $this->cachedImages($random_hash);
}
$imageCache = session_save_path() . '/email-cache-' . getenv('APACHE_RUN_USER') . '/mail/' . $this->tableName() . '-' . $this->id . '-images.txt';
$ids = $this->attachmentIds();
+
//$this->jerr(print_r($ids,true));
return '"' . addslashes($this->from_name) . '" <' . $this->from_email. '>' ;
}
+ function formatDate($dt, $format = 'd/M/Y')
+ {
+ return date($format, strtotime($dt));
+ }
+
}