Skip to content

Commit

Permalink
Added debug log for #431
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Jun 8, 2022
1 parent 0f02cc6 commit 03e8d38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/override-smtp-credentials/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ public function FilterSmtpCredentials($oAccount, $oSmtpClient, &$aSmtpCredential
$sHost = \trim($this->Config()->Get('plugin', 'smtp_host', ''));
$sWhiteList = \trim($this->Config()->Get('plugin', 'override_users', ''));

if (0 < strlen($sWhiteList) && 0 < \strlen($sHost) && \RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail, $sWhiteList))
$sFoundValue = '';
if (0 < strlen($sWhiteList) && 0 < \strlen($sHost) && \RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail, $sWhiteList, $sFoundValue))
{
\SnappyMail\LOG::debug('SMTP Override', "{$sEmail} matched {$sFoundValue}");
$aSmtpCredentials['Host'] = $sHost;
$aSmtpCredentials['Port'] = (int) $this->Config()->Get('plugin', 'smtp_port', 25);

Expand All @@ -53,6 +55,10 @@ public function FilterSmtpCredentials($oAccount, $oSmtpClient, &$aSmtpCredential
$aSmtpCredentials['Login'] = \trim($this->Config()->Get('plugin', 'smtp_user', ''));
$aSmtpCredentials['Password'] = (string) $this->Config()->Get('plugin', 'smtp_password', '');
}
else
{
\SnappyMail\LOG::debug('SMTP Override', "{$sEmail} no match");
}
}
}

Expand Down

0 comments on commit 03e8d38

Please sign in to comment.