diff options
author | Urban Müller | 2012-11-14 13:59:40 +0000 |
---|---|---|
committer | Urban Müller | 2012-11-14 13:59:40 +0000 |
commit | 1143249a29400c188914a5999fd1253e984264fe (patch) | |
tree | 5b710ea55caa0d482e98ed3eb671c3e5b484e949 | |
parent | 004c26e4c0f4b81c06ee67be26cb3abe33399dd6 (diff) | |
download | itools-1143249a29400c188914a5999fd1253e984264fe.tar.gz itools-1143249a29400c188914a5999fd1253e984264fe.tar.bz2 itools-1143249a29400c188914a5999fd1253e984264fe.zip |
set From: in it::error
-rw-r--r-- | it.class | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -222,7 +222,14 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de $body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body, array('utf8' => false)); } - it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); + it::mail(array( + 'From' => get_current_user() . "@" . gethostname(), + 'To' => $p['to'], + 'Subject' => substr($p['title'], 0, 160), + '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 |