mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Fix misspellings (Closes #119)
This commit is contained in:
parent
8979687f88
commit
77cdc4690b
7 changed files with 53 additions and 28 deletions
|
|
@ -42,7 +42,7 @@ class DirectadminChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
return array(
|
||||
\RainLoop\Plugins\Property::NewInstance('direct_admin_host')->SetLabel('DirectAdmin Host')
|
||||
->SetDefaultValue('')
|
||||
->SetDescription('Allowed patterns: {user:host-imap}, {user:host-smpt}, {user:domain}'),
|
||||
->SetDescription('Allowed patterns: {user:host-imap}, {user:host-smtp}, {user:domain}'),
|
||||
\RainLoop\Plugins\Property::NewInstance('direct_admin_port')->SetLabel('DirectAdmin Port')
|
||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
|
||||
->SetDefaultValue(2222),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
imap_host = "imap.gmail.com"
|
||||
imap_port = 993
|
||||
imap_secure = "SSL"
|
||||
smpt_host = "smtp.gmail.com"
|
||||
smpt_port = 465
|
||||
smpt_secure = "SSL"
|
||||
smpt_auth = On
|
||||
smtp_host = "smtp.gmail.com"
|
||||
smtp_port = 465
|
||||
smtp_secure = "SSL"
|
||||
smtp_auth = On
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
imap_host = "imap-mail.outlook.com"
|
||||
imap_port = 993
|
||||
imap_secure = "SSL"
|
||||
smpt_host = "smtp-mail.outlook.com"
|
||||
smpt_port = 587
|
||||
smpt_secure = "TLS"
|
||||
smpt_auth = On
|
||||
smtp_host = "smtp-mail.outlook.com"
|
||||
smtp_port = 587
|
||||
smtp_secure = "TLS"
|
||||
smtp_auth = On
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
imap_host = "imap.mail.yahoo.com"
|
||||
imap_port = 993
|
||||
imap_secure = "SSL"
|
||||
smpt_host = "smtp.mail.yahoo.com"
|
||||
smpt_port = 465
|
||||
smpt_secure = "SSL"
|
||||
smpt_auth = On
|
||||
smtp_host = "smtp.mail.yahoo.com"
|
||||
smtp_port = 465
|
||||
smtp_secure = "SSL"
|
||||
smtp_auth = On
|
||||
|
|
@ -4186,7 +4186,7 @@ class Actions
|
|||
return $this->DefaultResponse(__FUNCTION__, $mResult);
|
||||
}
|
||||
|
||||
private function smptSendMessage($oAccount, $oMessage, $rMessageStream, $bAddHiddenRcpt = true)
|
||||
private function smtpSendMessage($oAccount, $oMessage, $rMessageStream, $bAddHiddenRcpt = true)
|
||||
{
|
||||
$oRcpt = $oMessage->GetRcpt();
|
||||
if ($oRcpt && 0 < $oRcpt->Count())
|
||||
|
|
@ -4337,7 +4337,7 @@ class Actions
|
|||
|
||||
if (false !== $iMessageStreamSize)
|
||||
{
|
||||
$this->smptSendMessage($oAccount, $oMessage, $rMessageStream);
|
||||
$this->smtpSendMessage($oAccount, $oMessage, $rMessageStream);
|
||||
|
||||
if (is_array($aDraftInfo) && 3 === count($aDraftInfo))
|
||||
{
|
||||
|
|
@ -4493,7 +4493,7 @@ class Actions
|
|||
|
||||
if (false !== $iMessageStreamSize)
|
||||
{
|
||||
$this->smptSendMessage($oAccount, $oMessage, $rMessageStream);
|
||||
$this->smtpSendMessage($oAccount, $oMessage, $rMessageStream);
|
||||
|
||||
if (\is_resource($rMessageStream))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,26 +127,26 @@ class Domain
|
|||
/**
|
||||
* @param array $aDomain
|
||||
*
|
||||
* @return \RainLoop\Domain | null
|
||||
* @return \RainLoop\Domain|null
|
||||
*/
|
||||
public static function NewInstanceFromDomainConfigArray($sName, $aDomain)
|
||||
{
|
||||
$oDomain = null;
|
||||
|
||||
if (0 < \strlen($sName) && \is_array($aDomain) && 0 < \strlen($aDomain['imap_host']) && 0 < \strlen($aDomain['imap_port']) &&
|
||||
0 < \strlen($aDomain['smpt_host']) && 0 < \strlen($aDomain['smpt_port']))
|
||||
0 < \strlen($aDomain['smtp_host']) && 0 < \strlen($aDomain['smtp_port']))
|
||||
{
|
||||
$sIncHost = (string) $aDomain['imap_host'];
|
||||
$iIncPort = (int) $aDomain['imap_port'];
|
||||
$iIncSecure = self::StrConnectionSecurityTypeToCons(
|
||||
!empty($aDomain['imap_secure']) ? $aDomain['imap_secure'] : '');
|
||||
|
||||
$sOutHost = (string) $aDomain['smpt_host'];
|
||||
$iOutPort = (int) $aDomain['smpt_port'];
|
||||
$sOutHost = (string) $aDomain['smtp_host'];
|
||||
$iOutPort = (int) $aDomain['smtp_port'];
|
||||
$iOutSecure = self::StrConnectionSecurityTypeToCons(
|
||||
!empty($aDomain['smpt_secure']) ? $aDomain['smpt_secure'] : '');
|
||||
!empty($aDomain['smtp_secure']) ? $aDomain['smtp_secure'] : '');
|
||||
|
||||
$bOutAuth = isset($aDomain['smpt_auth']) ? (bool) $aDomain['smpt_auth'] : true;
|
||||
$bOutAuth = isset($aDomain['smtp_auth']) ? (bool) $aDomain['smtp_auth'] : true;
|
||||
$sWhiteList = (string) (isset($aDomain['white_list']) ? $aDomain['white_list'] : '');
|
||||
|
||||
$bIncShortLogin = isset($aDomain['imap_short_login']) ? (bool) $aDomain['imap_short_login'] : false;
|
||||
|
|
@ -207,11 +207,11 @@ class Domain
|
|||
'imap_port = '.$this->iIncPort,
|
||||
'imap_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iIncSecure).'"',
|
||||
'imap_short_login = '.($this->bIncShortLogin ? 'On' : 'Off'),
|
||||
'smpt_host = "'.$this->encodeIniString($this->sOutHost).'"',
|
||||
'smpt_port = '.$this->iOutPort,
|
||||
'smpt_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iOutSecure).'"',
|
||||
'smtp_host = "'.$this->encodeIniString($this->sOutHost).'"',
|
||||
'smtp_port = '.$this->iOutPort,
|
||||
'smtp_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iOutSecure).'"',
|
||||
'smtp_short_login = '.($this->bOutShortLogin ? 'On' : 'Off'),
|
||||
'smpt_auth = '.($this->bOutAuth ? 'On' : 'Off'),
|
||||
'smtp_auth = '.($this->bOutAuth ? 'On' : 'Off'),
|
||||
'white_list = "'.$this->encodeIniString($this->sWhiteList).'"'
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,8 +149,33 @@ class DefaultDomain implements \RainLoop\Providers\Domain\DomainAdminInterface
|
|||
|
||||
if (\file_exists($this->sDomainPath.'/'.$sRealFileName.'.ini'))
|
||||
{
|
||||
$mResult = \RainLoop\Domain::NewInstanceFromDomainConfigArray(
|
||||
$sName, @\parse_ini_file($this->sDomainPath.'/'.$sRealFileName.'.ini'));
|
||||
$aDomain = @\parse_ini_file($this->sDomainPath.'/'.$sRealFileName.'.ini');
|
||||
// fix misspellings (#119)
|
||||
if (\is_array($aDomain))
|
||||
{
|
||||
if (isset($aDomain['smpt_host']))
|
||||
{
|
||||
$aDomain['smtp_host'] = $aDomain['smpt_host'];
|
||||
}
|
||||
|
||||
if (isset($aDomain['smpt_port']))
|
||||
{
|
||||
$aDomain['smtp_port'] = $aDomain['smpt_port'];
|
||||
}
|
||||
|
||||
if (isset($aDomain['smpt_secure']))
|
||||
{
|
||||
$aDomain['smtp_secure'] = $aDomain['smpt_secure'];
|
||||
}
|
||||
|
||||
if (isset($aDomain['smpt_auth']))
|
||||
{
|
||||
$aDomain['smtp_auth'] = $aDomain['smpt_auth'];
|
||||
}
|
||||
}
|
||||
//---
|
||||
|
||||
$mResult = \RainLoop\Domain::NewInstanceFromDomainConfigArray($sName, $aDomain);
|
||||
}
|
||||
else if ($bFindWithWildCard)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue