Commit 320fa675 authored by Jesse Norell's avatar Jesse Norell

fix quota notification mail

parent aee0071e
......@@ -829,6 +829,7 @@ class monitor_tools {
//* get mail headers, subject and body
$mailHeaders = '';
$mailFrom = '';
$mailBody = '';
$mailSubject = '';
$inHeader = true;
......@@ -844,6 +845,16 @@ class monitor_tools {
$mailSubject = trim($parts[1]);
continue;
}
if(strtolower($parts[0]) == 'From') {
$mailFrom = trim($parts[1]);
continue;
}
if(strtolower($parts[0]) == 'Cc') {
if (! in_array(trim($parts[1]), $recipients)) {
$recipients[] = trim($parts[1]);
}
continue;
}
unset($parts);
$mailHeaders .= trim($lines[$l]) . "\n";
} else {
......@@ -858,7 +869,7 @@ class monitor_tools {
$mailBody = strtr($mailBody, $placeholders);
for($r = 0; $r < count($recipients); $r++) {
$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailHeaders);
$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailFrom);
}
unset($mailSubject);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment