Monotone-Parent: 0869cb2e3bedff16fb0985d9bde1c2c2a5c80820

Monotone-Revision: ac0d12f89b420e5f1e825cebddb440417e76ce4b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-04-20T13:37:46
This commit is contained in:
Wolfgang Sourdeau
2012-04-20 13:37:46 +00:00
parent f306ab6a71
commit 2346d35d21
10 changed files with 134 additions and 4 deletions
+1
View File
@@ -37,6 +37,7 @@
- (NSArray *) userSources;
- (BOOL) mailCustomFromEnabled;
- (BOOL) mailAuxiliaryUserAccountsEnabled;
- (NSString *) mailDomain;
+5
View File
@@ -98,6 +98,11 @@
return [self stringForKey: @"OCSFolderInfoURL"];
}
- (BOOL) mailCustomFromEnabled
{
return [self boolForKey: @"SOGoMailCustomFromEnabled"];
}
- (BOOL) mailAuxiliaryUserAccountsEnabled
{
return [self boolForKey: @"SOGoMailAuxiliaryUserAccountsEnabled"];
+33 -2
View File
@@ -577,7 +577,7 @@
- (void) _appendSystemMailAccount
{
NSString *fullName, *replyTo, *imapLogin, *imapServer, *signature,
*encryption, *scheme, *action, *query;
*encryption, *scheme, *action, *query, *customValue;
NSMutableDictionary *mailAccount, *identity, *mailboxes, *receipts;
NSNumber *port;
NSMutableArray *identities;
@@ -647,6 +647,37 @@
max = [mails count];
if (max > 1)
max--;
/* custom from */
if ([[self domainDefaults] mailCustomFromEnabled])
{
[self userDefaults];
customValue = [_defaults mailCustomEmail];
if ([customValue length] > 0)
{
identity = [NSMutableDictionary new];
[identity setObject: customValue forKey: @"email"];
fullName = [_defaults mailCustomFullName];
if (![fullName length])
{
fullName = [self cn];
if (![fullName length])
fullName = login;
}
[identity setObject: fullName forKey: @"fullName"];
if ([replyTo length] > 0)
[identity setObject: replyTo forKey: @"replyTo"];
signature = [_defaults mailSignature];
if (signature)
[identity setObject: signature forKey: @"signature"];
[identities addObject: identity];
[identity release];
}
}
for (count = 0; count < max; count++)
{
identity = [NSMutableDictionary new];
@@ -749,7 +780,7 @@
NSArray *identities;
identities = [[self mailAccounts] objectsForKey: @"identities"
notFoundMarker: nil];
notFoundMarker: nil];
return [identities flattenedArray];
}
+6
View File
@@ -130,6 +130,12 @@ extern NSString *SOGoWeekStartFirstFullWeek;
- (void) setMailSignaturePlacement: (NSString *) newValue;
- (NSString *) mailSignaturePlacement;
- (void) setMailCustomFullName: (NSString *) newValue;
- (NSString *) mailCustomFullName;
- (void) setMailCustomEmail: (NSString *) newValue;
- (NSString *) mailCustomEmail;
- (void) setMailReplyTo: (NSString *) newValue;
- (NSString *) mailReplyTo;
+26
View File
@@ -504,6 +504,8 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
- (void) setMailSignature: (NSString *) newValue
{
if ([newValue length] == 0)
newValue = nil;
[self setObject: newValue forKey: @"SOGoMailSignature"];
}
@@ -531,6 +533,30 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
return signaturePlacement;
}
- (void) setMailCustomFullName: (NSString *) newValue
{
if ([newValue length] == 0)
newValue = nil;
[self setObject: newValue forKey: @"SOGoMailCustomFullName"];
}
- (NSString *) mailCustomFullName
{
return [self stringForKey: @"SOGoMailCustomFullName"];
}
- (void) setMailCustomEmail: (NSString *) newValue
{
if ([newValue length] == 0)
newValue = nil;
[self setObject: newValue forKey: @"SOGoMailCustomEmail"];
}
- (NSString *) mailCustomEmail
{
return [self stringForKey: @"SOGoMailCustomEmail"];
}
- (void) setMailReplyTo: (NSString *) newValue
{
if ([newValue length] == 0)