Skip to content
Snippets Groups Projects
Commit e255b992 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch '4500-mail' into 'develop'

Use ISPConfig mail function (#4500)

Closes #4500

See merge request ispconfig/ispconfig3!1168
parents e2873fd2 7e24f006
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment