*
* $x= new Pman_Core_Mailer($opts)
*
- * $opts[
+ * $x= Pman_Core_Mailer(array(
page =>
contents
template
),
......
- ]
+ )
*
* recipents is gathered from the resulting template
* -- eg.
* if the file '
*
*
- * $x->asData(); // returns data needed for notify?? - notify should really
+ * $x->toData(); // returns data needed for notify?? - notify should really
* // just use this to pass around later..
*
* $x->send();
// for the html body, we may want to convert the attachments to images.
// var_dump($htmlbody);exit;
- $htmlbody = $this->htmlbodytoCID($htmlbody);
+ if ($this->replaceImages) {
+ $htmlbody = $this->htmlbodytoCID($htmlbody);
+ }
}
$mail = Mail::factory("SMTP",$mailOptions);
$email['headers']['Date'] = date('r');
if (PEAR::isError($mail)) {
- $pg->addEvent("COREMAILER-FAIL", false, "mail factory failed");
+ $pg->addEvent("COREMAILER-FAIL", false, "mail factory failed");
return $mail;
$cache = ini_get('session.save_path')."/Pman_Core_Mailer-{$user}/" . md5($url);
if (file_exists($cache) and filemtime($cache) > strtotime('NOW - 1 WEEK')) {
- $ret = json_decode($cache);
- print_r($ret);exit;
+ $ret = json_decode(file_get_contents($cache), true);
$ret['file'] = $cache . '.data';
return $ret;
}