Permalink
Browse files

Upgrade PHPMailer and finish HTML notifications

  • Loading branch information...
NEMS Linux
NEMS Linux committed Oct 31, 2018
1 parent d174a81 commit 76f318f77182d34fa2859c0ad290a1f433dbb8c6
Showing with 5 additions and 1 deletion.
  1. +5 −1 mailtest.sh
@@ -52,7 +52,11 @@ if (!filter_var($CONTACTEMAIL, FILTER_VALIDATE_EMAIL)) {
}
echo 'Please wait...' . PHP_EOL;
$ver = shell_exec('/usr/local/bin/nems-info nemsver');
if ($ver >= 1.4) {
if ($ver >= 1.5) {
$username = shell_exec('/usr/local/bin/nems-info username');
echo shell_exec('/usr/local/nagios/libexec/nems_sendmail_service "TEST NOTIFICATION" "NEMS" "Nagios Enterprise Monitoring Server" "UP" "127.0.0.1" "The test email was sent successfully." "' . date('Y-m-d H:i:s') . '" "nems-mailtest" "SUCCESS" "nems@category5.tv" "361" "0.061" "1" "0" "0" "' . strtotime('now') . '" "' . strtotime('now') . '" "0" "" "' . $username . '" "nems-mailtest successfully sent this message." "" "0" "1" "1" "' . $username . '"');
exit();
} elseif ($ver >= 1.4) {
$resource = file('/usr/local/nagios/etc/resource.cfg');
} else {
$resource = file('/etc/nagios3/resource.cfg');

0 comments on commit 76f318f

Please sign in to comment.