Commit 7e24f006 authored by Thom's avatar Thom 🛠

Use ISPConfig mail function (#4500)

parent acb7db0d
......@@ -44,12 +44,12 @@ class monitor_tools {
//** Debian or Ubuntu
if(file_exists('/etc/debian_version')) {
// Check if this is Ubuntu and not Debian
if (strstr(trim(file_get_contents('/etc/issue')), 'Ubuntu') || (is_file('/etc/os-release') && stristr(file_get_contents('/etc/os-release'), 'Ubuntu'))) {
$issue = file_get_contents('/etc/issue');
// Use content of /etc/issue file
if(strstr($issue,'Ubuntu')) {
if (strstr(trim($issue), 'LTS')) {
......@@ -75,7 +75,7 @@ class monitor_tools {
} else {
$lts = "";
}
$distname = 'Ubuntu';
$distid = 'debian40';
$distbaseid = 'debian';
......@@ -353,7 +353,7 @@ class monitor_tools {
} else {
die('Unrecognized GNU/Linux distribution');
}
// Set $distconfid to distid, if no different id for the config is defined
if(!isset($distconfid)) $distconfid = $distid;
......@@ -832,7 +832,7 @@ class monitor_tools {
$mailBody = strtr($mailBody, $placeholders);
for($r = 0; $r < count($recipients); $r++) {
mail($recipients[$r], $mailSubject, $mailBody, $mailHeaders);
$app->functions->mail($recipients[$r], $mailSubject, $mailBody, $mailHeaders);
}
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