2014-04-18 23:47:15 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|
|
|
{
|
|
|
|
public function Init()
|
|
|
|
{
|
|
|
|
$this->addHook('filter.smtp-credentials', 'FilterSmtpCredentials');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-11-15 04:23:46 +08:00
|
|
|
* @param \RainLoop\Model\Account $oAccount
|
2014-04-18 23:47:15 +08:00
|
|
|
* @param array $aSmtpCredentials
|
|
|
|
*/
|
|
|
|
public function FilterSmtpCredentials($oAccount, &$aSmtpCredentials)
|
|
|
|
{
|
2014-11-15 04:23:46 +08:00
|
|
|
if ($oAccount instanceof \RainLoop\Model\Account && \is_array($aSmtpCredentials))
|
2014-04-18 23:47:15 +08:00
|
|
|
{
|
|
|
|
// Default:
|
|
|
|
// $aSmtpCredentials['Ehlo'] = \MailSo\Smtp\SmtpClient::EhloHelper();
|
|
|
|
//
|
|
|
|
// or write your custom php
|
|
|
|
$aSmtpCredentials['Ehlo'] = 'localhost';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|