mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Additional accounts now always get the mail address from ldap
This commit is contained in:
parent
9cfe164633
commit
b8c681d1a5
3 changed files with 16 additions and 42 deletions
|
|
@ -63,6 +63,7 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
public function MapImapCredentialsByLDAP(\RainLoop\Model\Account $oAccount, \MailSo\Imap\ImapClient $oImapClient, \MailSo\Imap\Settings $oSettings)
|
||||
{
|
||||
//$oSettings->Login = $oAccount->IncLogin();
|
||||
//$this->Manager()->Actions()->Logger()->Write("E-Mail address: $oSettings->Login", \LOG_WARNING, "LDAP MAIL ACCOUNTS PLUGIN");
|
||||
}
|
||||
|
||||
// Function gets called by Account.php
|
||||
|
|
@ -97,20 +98,6 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
->SetDefaultValue("mail"),
|
||||
]);
|
||||
|
||||
$groupOverwriteAdditionalAccount = new \RainLoop\Plugins\PropertyCollection('Overwrite mail address of additional account');
|
||||
$groupOverwriteAdditionalAccount->exchangeArray([
|
||||
\RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_BOOL_OVERWRITE_MAIL_ADDRESS_ADDITIONAL_ACCOUNT)->SetLabel('Enabled')
|
||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL)
|
||||
->SetDefaultValue(false),
|
||||
|
||||
\RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_MAIL_ADDRESS_ADDITIONAL_ACCOUNT)
|
||||
->SetLabel("Mail address field for additional account")
|
||||
->SetType(RainLoop\Enumerations\PluginPropertyType::STRING)
|
||||
->SetDescription("The ldap field containing the mail address to use on the found additional mail account.
|
||||
\nThe value found inside ldap will be used as mail address of the additional mail accounts created by this plugin.")
|
||||
->SetDefaultValue("mail"),
|
||||
]);
|
||||
|
||||
return [
|
||||
\RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_SERVER)
|
||||
->SetLabel("LDAP Server URL")
|
||||
|
|
@ -173,15 +160,21 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
\nIf this field contains an email address, only the domain-part after the @ is used.")
|
||||
->SetDefaultValue("mail"),
|
||||
|
||||
\RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_MAIL_ADDRESS_ADDITIONAL_ACCOUNT)
|
||||
->SetLabel("Mail address field for additional account")
|
||||
->SetType(RainLoop\Enumerations\PluginPropertyType::STRING)
|
||||
->SetDescription("The ldap field containing the mail address to use on the found additional mail account.
|
||||
\nThe value found inside ldap will be used as mail address of the additional mail accounts created by this plugin.
|
||||
\nIn most cases this could be the same ldap field as in \"Domain name field of additional account\"")
|
||||
->SetDefaultValue("mail"),
|
||||
|
||||
\RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_NAME)
|
||||
->SetLabel("Additional account name field")
|
||||
->SetType(RainLoop\Enumerations\PluginPropertyType::STRING)
|
||||
->SetDescription("The field containing the default sender name of the found additional mail account.")
|
||||
->SetDefaultValue("displayName"),
|
||||
|
||||
$groupOverwriteMainAccount,
|
||||
|
||||
$groupOverwriteAdditionalAccount,
|
||||
$groupOverwriteMainAccount
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue