mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-05 06:22:52 +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
|
const
|
||||||
NAME = 'Override SMTP Credentials',
|
NAME = 'Override SMTP Credentials',
|
||||||
VERSION = '2.1',
|
VERSION = '2.2',
|
||||||
RELEASE = '2021-04-21',
|
RELEASE = '2022-04-13',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Filters',
|
CATEGORY = 'Filters',
|
||||||
DESCRIPTION = 'Override SMTP credentials for specific users.';
|
DESCRIPTION = 'Override SMTP credentials for specific users.';
|
||||||
|
|
||||||
public function Init() : void
|
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 \RainLoop\Model\Account $oAccount
|
||||||
|
* @param \MailSo\Smtp\SmtpClient $oSmtpClient
|
||||||
* @param array $aSmtpCredentials
|
* @param array $aSmtpCredentials
|
||||||
*/
|
*/
|
||||||
public function FilterSmtpCredentials($oAccount, &$aSmtpCredentials)
|
public function FilterSmtpCredentials($oAccount, $oSmtpClient, &$aSmtpCredentials)
|
||||||
{
|
{
|
||||||
if ($oAccount instanceof \RainLoop\Model\Account && \is_array($aSmtpCredentials))
|
if ($oAccount instanceof \RainLoop\Model\Account && \is_array($aSmtpCredentials))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue