summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it.class b/it.class
index 74dc4da..4d05a2c 100644
--- a/it.class
+++ b/it.class
@@ -290,7 +290,8 @@ static function error($p = array())
if (!it::is_live() || array_diff($debugparams, it::match('[-\w]+', $GLOBALS['ULTRAHOME'], ['all' => true]), ["devel", "twin", "utf8check", gethostname()]))
$type = mb_strtolower($type);
- it::mail(['To' => $p['to'], 'Subject' => $type . substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()]);
+ $from = trim(it::exec('echo \"$USER@`hostname`\" "<$USER@`dnsdomainname | grep . || hostname -f`>"'));
+ it::mail(['From' => $from, 'To' => $p['to'], 'Subject' => $type . substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()]);
$p['title'] = "Mail: " . $p['title'];
}
else if ($_SERVER['REMOTE_ADDR'] && EDC('edplain')) # toscreen mode: web