$mailOptions = PEAR::getStaticProperty('Mail','options');
//print_R($mailOptions);exit;
$mail = Mail::factory("SMTP",$mailOptions);
- $headers['Date'] = date('r');
+ $email['headers']['Date'] = date('r');
if (PEAR::isError($mail)) {
$pg->addEvent("COREMAILER-FAIL", false, "mail factory failed");
error_reporting($oe);
if ($ret === true) {
$pg->addEvent("COREMAILER-SENT", false,
- 'To: ' . implode(', ', $rcpts) .
- 'Subject ' . $headers['subject']
- ));
-
+ 'To: ' . ( is_array($rcpts) ? implode(', ', $rcpts) : $rcpts ) .
+ 'Subject: ' . @$email['headers']['Subject']
+ );
+ }
return $ret;
}