Drop deprecated Domain::SetConfig()

This commit is contained in:
the-djmaze 2024-03-10 23:21:07 +01:00
parent e07749be6a
commit cc22327279
3 changed files with 58 additions and 84 deletions

View file

@ -78,11 +78,15 @@ class SnappyMailHelper
// $oDomain = \RainLoop\Model\Domain::fromIniArray('owncloud', []);
$oDomain = new \RainLoop\Model\Domain('owncloud');
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::NONE;
$oDomain->SetConfig(
'localhost', 143, $iSecurityType, true,
true, 'localhost', 4190, $iSecurityType,
'localhost', 25, $iSecurityType, true, true, false, false,
'');
$oDomain->ImapSettings()->host = 'localhost';
$oDomain->ImapSettings()->type = $iSecurityType;
$oDomain->ImapSettings()->shortLogin = true;
$oDomain->SieveSettings()->enabled = true;
$oDomain->SieveSettings()->host = 'localhost';
$oDomain->SieveSettings()->type = $iSecurityType;
$oDomain->SmtpSettings()->host = 'localhost';
$oDomain->SmtpSettings()->type = $iSecurityType;
$oDomain->SmtpSettings()->shortLogin = true;
$oProvider->Save($oDomain);
if (!$oConfig->Get('login', 'default_domain', '')) {
$oConfig->Set('login', 'default_domain', 'owncloud');