diff options
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -228,7 +228,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de $body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body); } - it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body) + (($cc = $GLOBALS['it_defaultconfig']['error_cc']) ? array('Cc' => $cc) : array())); + it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); } else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web echo "<pre>" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "</pre>"; # works with iso-8859-1 or utf-8, UTF8SAFE @@ -813,7 +813,7 @@ static function mail($p) { $headers = $p; unset($headers['forcemail'], $headers['Body']); - $mail = new it_mail($headers); + $mail = new it_mail(array_filter($headers)); $mail->add_body($p['Body']); return $mail->send($p); |