mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Merge pull request #324 from azonti/master
fix `override-smtp-credentials`
This commit is contained in:
commit
41e794f684
1 changed files with 6 additions and 4 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue