From d93e27a40d0755b54b716d18f46b596beec22f58 Mon Sep 17 00:00:00 2001 From: Shu Takayama Date: Wed, 13 Apr 2022 16:46:58 +0900 Subject: [PATCH] fix override-smtp-credentials --- plugins/override-smtp-credentials/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/override-smtp-credentials/index.php b/plugins/override-smtp-credentials/index.php index 9ade6106a..ef9d6057e 100644 --- a/plugins/override-smtp-credentials/index.php +++ b/plugins/override-smtp-credentials/index.php @@ -4,22 +4,24 @@ class OverrideSmtpCredentialsPlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Override SMTP Credentials', - VERSION = '2.1', - RELEASE = '2021-04-21', + VERSION = '2.2', + RELEASE = '2022-04-13', REQUIRED = '2.5.0', CATEGORY = 'Filters', DESCRIPTION = 'Override SMTP credentials for specific users.'; public function Init() : void { - $this->addHook('smtp.credentials', 'FilterSmtpCredentials'); + $this->addHook('smtp.before-connect', 'FilterSmtpCredentials'); + $this->addHook('smtp.before-login', 'FilterSmtpCredentials'); } /** * @param \RainLoop\Model\Account $oAccount + * @param \MailSo\Smtp\SmtpClient $oSmtpClient * @param array $aSmtpCredentials */ - public function FilterSmtpCredentials($oAccount, &$aSmtpCredentials) + public function FilterSmtpCredentials($oAccount, $oSmtpClient, &$aSmtpCredentials) { if ($oAccount instanceof \RainLoop\Model\Account && \is_array($aSmtpCredentials)) {