diff options
author | Urban Müller | 2023-07-25 18:57:58 +0200 |
---|---|---|
committer | Urban Müller | 2023-07-25 18:57:58 +0200 |
commit | c91fb0dc3417daeb517d4e912000c10a6da50b9c (patch) | |
tree | fe7008bb4fd6b153e2b0c8076967c2938d32d43b | |
parent | 6b5c81c9ee37f37e7bf228dc2f688b945c6c8663 (diff) | |
download | itools-c91fb0dc3417daeb517d4e912000c10a6da50b9c.tar.gz itools-c91fb0dc3417daeb517d4e912000c10a6da50b9c.tar.bz2 itools-c91fb0dc3417daeb517d4e912000c10a6da50b9c.zip |
experimentally add ID to error mails
-rw-r--r-- | it.class | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -273,10 +273,12 @@ static function error($p = array(), $extra = null) $p['body'] = " See " . getenv('HOSTNAME') . ":$datafn"; } + $mailid = "mail" . (crc32($p['title'] . $url) % 10000); + $body = ($p['omitdebuginfo'] >= 2 ? "" : ($url && !$toscreen? "Title: {$p['title']}\nUrl: $url\n" : "") . ($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n" : "")) . - (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . " at " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (invoked {$t}s before)" : "") . "\n") . # no it::date() due to time- debug param + (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . " at " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (invoked {$t}s before)" : "") . " id $mailid\n") . # no it::date() due to time- debug param ($sendmail ? $p['head'] : "") . ($p['id'] && !$toscreen ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n" : "") . (!$origp['blockmail'] || $p['omitdebuginfo'] || $toscreen ? "" : "Block-resend: " . $origp['blockmail'] . " seconds\n") . @@ -316,7 +318,7 @@ static function error($p = array(), $extra = null) if ($sendmail) it::mail([ - 'From' => "\"$user@" . gethostname() . "\" <$user>", + 'From' => "\"$user@" . gethostname() . " $mailid\" <$user>", 'To' => $p['to'], 'Reply-To' => $p['to'], 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], |