$p = new PEAR();
$contents = (array)$obj;
-
+
+ var_dump($content);
+
if(empty($this->id) && !empty($contents['template'])){
$this->get('name', $contents['template']);
}
$contents['rcpts'] = $admin;
}
+ //subject replacement
if(empty($contents['subject'])){
$contents['subject'] = $this->subject;
}
+
+ if (!empty($content['subject_replace'])) {
+ foreach ($content['mapping'] as $pattern => $replace) {
+ $content['subject'] = preg_replace($pattern,$replace,$content['subject']);
+ }
+ }
if(!empty($contents['rcpts']) && is_array($contents['rcpts'])){
$contents['rcpts'] = implode(',', $contents['rcpts']);
* DEPRICATED !!! - DO NOT USE THIS !!!
*
* use: toMailerData() -- to return the email data..
- * or toMailer($obj, false)->send()
+ * or
+ * $mailer = $core_email->toMailer($obj, false);
+ * $sent = is_a($mailer,'PEAR_Error') ? false : $mailer->send();
+
+ * toMailer($obj, false)->send()
*
*
*/