Skip to content
Permalink
Browse files

Interpret NULL as disabled

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 7, 2019
1 parent f4de6a7 commit 27105e034a2a7f749462fec4bd92edf4d13fee24
Showing with 4 additions and 4 deletions.
  1. +2 −2 data/1.5/nagios/plugins/nems_sendmail_host
  2. +2 −2 data/1.5/nagios/plugins/nems_sendmail_service
@@ -508,8 +508,8 @@ $mail->isSMTP();
$mailserver = explode(':',$nems['resource']['USER7']);
$mail->Host = $mailserver[0];
$mail->Port = $mailserver[1];
// NEMS00001 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0) {
// NEMS00002 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0 && strtoupper($nems['resource']['USER9']) != 'NULL') {
$mail->SMTPAuth = true;
$mail->Username = $nems['resource']['USER9'];
$mail->Password = $nems['resource']['USER10'];
@@ -535,8 +535,8 @@ $mail->isSMTP();
$mailserver = explode(':',$nems['resource']['USER7']);
$mail->Host = $mailserver[0];
$mail->Port = $mailserver[1];
// NEMS00001 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0) {
// NEMS00002 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0 && strtoupper($nems['resource']['USER9']) != 'NULL') {
$mail->SMTPAuth = true;
$mail->Username = $nems['resource']['USER9'];
$mail->Password = $nems['resource']['USER10'];

0 comments on commit 27105e0

Please sign in to comment.
You can’t perform that action at this time.