snappymail/plugins/change-smtp-ehlo-message/index.php
2020-08-30 18:04:54 +02:00

25 lines
621 B
PHP

<?php
class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
{
public function Init() : void
{
$this->addHook('filter.smtp-credentials', 'FilterSmtpCredentials');
}
/**
* @param \RainLoop\Model\Account $oAccount
* @param array $aSmtpCredentials
*/
public function FilterSmtpCredentials($oAccount, &$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';
}
}
}