mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Add a default Domain configuration for Nextcloud #596
This commit is contained in:
parent
3c57f39ae0
commit
0d4a4ad280
1 changed files with 19 additions and 0 deletions
|
|
@ -50,6 +50,25 @@ class SnappyMailHelper
|
|||
$bSave = true;
|
||||
}
|
||||
|
||||
$ocConfig = \OC::$server->getConfig();
|
||||
if ($ocConfig->getAppValue('snappymail', 'snappymail-autologin', false)
|
||||
|| $ocConfig->getAppValue('snappymail', 'snappymail-autologin-with-email', false)
|
||||
) {
|
||||
$oProvider = \RainLoop\Api::Actions()->DomainProvider();
|
||||
$oDomain = $oProvider->Load('nextcloud');
|
||||
if (!($oDomain instanceof \RainLoop\Model\Domain)) {
|
||||
$oDomain = new \RainLoop\Model\Domain('nextcloud');
|
||||
$oDomain->SetConfig(
|
||||
'localhost', 143, \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, true,
|
||||
true, 'localhost', 4190, \MailSo\Net\Enumerations\ConnectionSecurityType::NONE,
|
||||
'localhost', 25, \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, true, true, false, false,
|
||||
'');
|
||||
$oProvider->Save($oDomain);
|
||||
$oConfig->Set('login', 'default_domain', 'nextcloud');
|
||||
$bSave = true;
|
||||
}
|
||||
}
|
||||
|
||||
$bSave && $oConfig->Save();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue