feat(mail): handle multiple mail identities

Fixes #768, fixes #4602
This commit is contained in:
Francis Lachapelle
2020-06-18 16:53:42 -04:00
parent 2651b5aa9d
commit f8aa338e64
24 changed files with 607 additions and 428 deletions
+4 -1
View File
@@ -426,10 +426,13 @@ static SoProduct *preferencesProduct = nil;
}
if (account)
[accounts insertObject: account atIndex: 0];
[values setObject: accounts forKey: @"AuxiliaryMailAccounts"];
// Ignore parameters as they are injected in the system mail account ([SOGoUser mailAccounts])
[values removeObjectForKey: @"SOGoMailIdentities"];
[values removeObjectForKey: @"SOGoMailCertificate"];
[values removeObjectForKey: @"SOGoMailCertificateAlwaysSign"];
[values removeObjectForKey: @"SOGoMailCertificateAlwaysEncrypt"];
[values setObject: accounts forKey: @"AuxiliaryMailAccounts"];
// Add the domain's default vacation subject if user has not specified a custom subject
vacationOptions = [defaults vacationOptions];