From 1143249a29400c188914a5999fd1253e984264fe Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 14 Nov 2012 13:59:40 +0000 Subject: set From: in it::error --- it.class | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/it.class b/it.class index 7d96342..980e0fe 100644 --- a/it.class +++ b/it.class @@ -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 "
" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "
"; # works with iso-8859-1 or utf-8, UTF8SAFE -- cgit v1.2.3