diff options
author | Urban Müller | 2012-04-04 15:32:25 +0000 |
---|---|---|
committer | Urban Müller | 2012-04-04 15:32:25 +0000 |
commit | b88037b253c848a2a786c7cd3b28b3b75ce7d6c7 (patch) | |
tree | 5d20ef53aca5905fe0ef26f356bc80a746c6e248 | |
parent | a0231e4df6f8bfa82451c05998bb349ece764610 (diff) | |
download | itools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.tar.gz itools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.tar.bz2 itools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.zip |
force sending of mails in it::error if not displayable
-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); |