mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-10 07:48:52 +00:00
merge of '402b5b43e7c75b50806b41e7372eed0e61a4de9f'
and '4d091aae297e1a3ea2ef11b35c1df5c2c60c6fea' Monotone-Parent: 402b5b43e7c75b50806b41e7372eed0e61a4de9f Monotone-Parent: 4d091aae297e1a3ea2ef11b35c1df5c2c60c6fea Monotone-Revision: 06f33f8f7c4581f3ec39d5cce6e3b77a99d436b0 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-04-26T12:28:08
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
|
||||
2012-04-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m (_extractMainIdentity:): save
|
||||
the custom full name even when the configured custom email has the
|
||||
same value as the system value.
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m (-appendSystemMailAccount): append
|
||||
custom identity even though only the full name has a custom value.
|
||||
|
||||
* SoObjects/Mailer/SOGoDraftObject.m
|
||||
(-bodyPartForAttachmentWithName:): force conversion of rfc822
|
||||
content to quoted-printable, since it would otherwise risk passing
|
||||
|
||||
@@ -577,7 +577,7 @@
|
||||
- (void) _appendSystemMailAccount
|
||||
{
|
||||
NSString *fullName, *replyTo, *imapLogin, *imapServer, *signature,
|
||||
*encryption, *scheme, *action, *query, *customValue;
|
||||
*encryption, *scheme, *action, *query, *customEmail;
|
||||
NSMutableDictionary *mailAccount, *identity, *mailboxes, *receipts;
|
||||
NSNumber *port;
|
||||
NSMutableArray *identities;
|
||||
@@ -652,19 +652,22 @@
|
||||
if ([[self domainDefaults] mailCustomFromEnabled])
|
||||
{
|
||||
[self userDefaults];
|
||||
customValue = [_defaults mailCustomEmail];
|
||||
if ([customValue length] > 0)
|
||||
customEmail = [_defaults mailCustomEmail];
|
||||
fullName = [_defaults mailCustomFullName];
|
||||
if ([customEmail length] > 0 || [fullName length] > 0)
|
||||
{
|
||||
identity = [NSMutableDictionary new];
|
||||
[identity setObject: customValue forKey: @"email"];
|
||||
if ([customEmail length] == 0)
|
||||
customEmail = [mails objectAtIndex: 0];
|
||||
|
||||
fullName = [_defaults mailCustomFullName];
|
||||
if (![fullName length])
|
||||
if ([fullName length] == 0)
|
||||
{
|
||||
fullName = [self cn];
|
||||
if (![fullName length])
|
||||
if ([fullName length] == 0)
|
||||
fullName = login;
|
||||
}
|
||||
|
||||
identity = [NSMutableDictionary new];
|
||||
[identity setObject: customEmail forKey: @"email"];
|
||||
[identity setObject: fullName forKey: @"fullName"];
|
||||
|
||||
if ([replyTo length] > 0)
|
||||
|
||||
@@ -1297,17 +1297,15 @@
|
||||
returned by the user directory service. */
|
||||
if ([value length] == 0
|
||||
|| [[user allEmails] containsObject: value])
|
||||
{
|
||||
[userDefaults setMailCustomEmail: nil];
|
||||
[userDefaults setMailCustomFullName: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[userDefaults setMailCustomEmail: value];
|
||||
value = [[identity objectForKey: @"fullName"]
|
||||
stringByTrimmingSpaces];
|
||||
[userDefaults setMailCustomFullName: value];
|
||||
}
|
||||
value = nil;
|
||||
[userDefaults setMailCustomEmail: value];
|
||||
|
||||
value = [[identity objectForKey: @"fullName"]
|
||||
stringByTrimmingSpaces];
|
||||
if ([value length] == 0
|
||||
|| [[user cn] isEqualToString: value])
|
||||
value = nil;
|
||||
[userDefaults setMailCustomFullName: value];
|
||||
}
|
||||
|
||||
value = [[identity objectForKey: @"replyTo"]
|
||||
|
||||
Reference in New Issue
Block a user