mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Merge all example plugins
This commit is contained in:
parent
f588c91570
commit
eb61563db4
23 changed files with 230 additions and 425 deletions
|
|
@ -9,22 +9,21 @@ class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
public function Init() : void
|
||||
{
|
||||
$this->addHook('smtp.credentials', 'FilterSmtpCredentials');
|
||||
$this->addHook('smtp.before-connect', 'FilterSmtpCredentials');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account $oAccount
|
||||
* @param array $aSmtpCredentials
|
||||
*/
|
||||
public function FilterSmtpCredentials($oAccount, &$aSmtpCredentials)
|
||||
public function FilterSmtpCredentials(\RainLoop\Model\Account $oAccount,
|
||||
\MailSo\Smtp\SmtpClient $oSmtpClient,
|
||||
array &$aSmtpCredentials)
|
||||
{
|
||||
if ($oAccount instanceof \RainLoop\Model\Account && \is_array($aSmtpCredentials))
|
||||
{
|
||||
// Default:
|
||||
// $aSmtpCredentials['Ehlo'] = \MailSo\Smtp\SmtpClient::EhloHelper();
|
||||
//
|
||||
// or write your custom php
|
||||
$aSmtpCredentials['Ehlo'] = 'localhost';
|
||||
}
|
||||
// Default:
|
||||
// $aSmtpCredentials['Ehlo'] = \MailSo\Smtp\SmtpClient::EhloHelper();
|
||||
//
|
||||
// or write your custom php
|
||||
$aSmtpCredentials['Ehlo'] = 'localhost';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue