mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
added new config options to overwrite the mail address
This commit is contained in:
parent
8b8b0fc7e4
commit
30e3a8cc0f
2 changed files with 68 additions and 23 deletions
|
|
@ -18,6 +18,10 @@ class LdapMailAccountsConfig
|
|||
public const CONFIG_FIELD_USERNAME = "field_username";
|
||||
public const CONFIG_SEARCH_STRING = "search_string";
|
||||
public const CONFIG_FIELD_MAIL_DOMAIN = "field_domain";
|
||||
public const CONFIG_FIELD_MAIL_ADDRESS_MAIN_ACCOUNT = "field_mail_address_main_account";
|
||||
public const CONFIG_FIELD_MAIL_ADDRESS_ADDITIONAL_ACCOUNT = "field_mail_address_additional_account";
|
||||
public const CONFIG_BOOL_OVERWRITE_MAIL_ADDRESS_MAIN_ACCOUNT = "bool_overwrite_mail_address_main_account";
|
||||
public const CONFIG_BOOL_OVERWRITE_MAIL_ADDRESS_ADDITIONAL_ACCOUNT = "bool_overwrite_mail_address_additional_account";
|
||||
|
||||
public $server;
|
||||
public $protocol;
|
||||
|
|
@ -30,6 +34,10 @@ class LdapMailAccountsConfig
|
|||
public $field_username;
|
||||
public $search_string;
|
||||
public $field_domain;
|
||||
public $field_mail_address_main_account;
|
||||
public $field_mail_address_additional_account;
|
||||
public $bool_overwrite_mail_address_main_account;
|
||||
public $bool_overwrite_mail_address_additional_account;
|
||||
|
||||
public static function MakeConfig(Plugin $config): LdapMailAccountsConfig
|
||||
{
|
||||
|
|
@ -45,6 +53,10 @@ class LdapMailAccountsConfig
|
|||
$ldap->field_username = trim($config->Get("plugin", self::CONFIG_FIELD_USERNAME));
|
||||
$ldap->search_string = trim($config->Get("plugin", self::CONFIG_SEARCH_STRING));
|
||||
$ldap->field_domain = trim($config->Get("plugin", self::CONFIG_FIELD_MAIL_DOMAIN));
|
||||
$ldap->bool_overwrite_mail_address_main_account = $config->Get("plugin", self::CONFIG_BOOL_OVERWRITE_MAIL_ADDRESS_MAIN_ACCOUNT);
|
||||
$ldap->field_mail_address_main_account = trim($config->Get("plugin", self::CONFIG_FIELD_MAIL_ADDRESS_MAIN_ACCOUNT));
|
||||
$ldap->bool_overwrite_mail_address_additional_account = $config->Get("plugin", self::CONFIG_BOOL_OVERWRITE_MAIL_ADDRESS_ADDITIONAL_ACCOUNT);
|
||||
$ldap->field_mail_address_additional_account = trim($config->Get("plugin", self::CONFIG_FIELD_MAIL_ADDRESS_ADDITIONAL_ACCOUNT));
|
||||
|
||||
return $ldap;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue