mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 16:33:22 +00:00
merge of '0c1ec7e54de5221c8ed291d64541b4524fc8ca6d'
and '71bc211c9fb2a32b06f59717e4f1706d6482c950' Monotone-Parent: 0c1ec7e54de5221c8ed291d64541b4524fc8ca6d Monotone-Parent: 71bc211c9fb2a32b06f59717e4f1706d6482c950 Monotone-Revision: f6829bdd7a8f8207d69f2c7bd6e1dc52fe733eb0 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-12-27T22:37:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
2009-12-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
2009-12-26 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailAccount.m (-isSharedAccount): removed
|
||||
useless method.
|
||||
(-sharedAccountName): removed useless method.
|
||||
* SoObjects/SOGo/SOGoMailer.m (_smtpSendData:
|
||||
toRecipients:sender:): We now honor the 'port'
|
||||
part in the SMTP server address. So one can now
|
||||
specify hostname:port (like localhost:587) as
|
||||
a value of SOGoSMTPServer. This fixes
|
||||
http://www.scalableogo.org/bugs/view.php?id=201
|
||||
|
||||
* SoObjects/Mailer/SOGoMailForward.m (init):
|
||||
Now consider SOGoMailComposeMessageType instead
|
||||
of ComposeMessagesType when checking if we are
|
||||
using HTML mails composition mode. This fixes
|
||||
http://www.scalableogo.org/bugs/view.php?id=280
|
||||
|
||||
2009-12-25 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Tools/SOGoToolBackup.m (-fetchUserIDs:):
|
||||
We now use a local autorelease pool and flush
|
||||
it after every 100 requests to the LDAP (or
|
||||
other source type) server.
|
||||
|
||||
2009-12-23 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
|
||||
@@ -38,7 +38,12 @@
|
||||
{
|
||||
SOGoUserDefaults *ud;
|
||||
ud = [[context activeUser] userDefaults];
|
||||
htmlComposition = [[ud objectForKey: @"ComposeMessagesType"] isEqualToString: @"html"];
|
||||
|
||||
// Backward comptability with <= 1.1.0 (ComposeMessagesType)
|
||||
if ([ud objectForKey: @"ComposeMessagesType"])
|
||||
htmlComposition = [[ud objectForKey: @"ComposeMessagesType"] isEqualToString: @"html"];
|
||||
else
|
||||
htmlComposition = [[ud objectForKey: @"SOGoMailComposeMessageType"] isEqualToString: @"html"];
|
||||
|
||||
sourceMail = nil;
|
||||
currentValue = nil;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#import <NGMail/NGSendMail.h>
|
||||
#import <NGMail/NGSmtpClient.h>
|
||||
#import <NGMime/NGMimePartGenerator.h>
|
||||
#import <NGStreams/NGInternetSocketAddress.h>
|
||||
|
||||
#import "NSString+Utilities.h"
|
||||
#import "SOGoDomainDefaults.h"
|
||||
@@ -115,14 +116,32 @@
|
||||
toRecipients: (NSArray *) recipients
|
||||
sender: (NSString *) sender
|
||||
{
|
||||
NGInternetSocketAddress *addr;
|
||||
NSString *currentTo, *host;
|
||||
NSEnumerator *addresses;
|
||||
NGSmtpClient *client;
|
||||
NSEnumerator *addresses;
|
||||
NSString *currentTo;
|
||||
unsigned int toErrors;
|
||||
NSException *result;
|
||||
NSRange r;
|
||||
|
||||
unsigned int toErrors, port;
|
||||
|
||||
client = [NGSmtpClient smtpClient];
|
||||
if ([client connectToHost: smtpServer])
|
||||
host = smtpServer;
|
||||
port = 25;
|
||||
|
||||
// We check if there is a port specified in the smtpServer ivar value
|
||||
r = [smtpServer rangeOfString: @":"];
|
||||
|
||||
if (r.length)
|
||||
{
|
||||
port = [[smtpServer substringFromIndex: r.location+1] intValue];
|
||||
host = [smtpServer substringToIndex: r.location];
|
||||
}
|
||||
|
||||
addr = [NGInternetSocketAddress addressWithPort: port
|
||||
onHost: host];
|
||||
|
||||
if ([client connectToAddress: addr])
|
||||
{
|
||||
if ([client mailFrom: sender])
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSString.h>
|
||||
@@ -118,6 +119,7 @@
|
||||
|
||||
- (BOOL) fetchUserIDs: (NSArray *) users
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
SOGoUserManager *lm;
|
||||
NSDictionary *infos;
|
||||
NSString *user;
|
||||
@@ -125,6 +127,8 @@
|
||||
int count, max;
|
||||
|
||||
lm = [SOGoUserManager sharedUserManager];
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
max = [users count];
|
||||
user = [users objectAtIndex: 0];
|
||||
if (max == 1 && [user isEqualToString: @"ALL"])
|
||||
@@ -134,6 +138,12 @@
|
||||
allUsers = [NSMutableArray array];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
if (count > 0 && count%100 == 0)
|
||||
{
|
||||
DESTROY(pool);
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
user = [users objectAtIndex: count];
|
||||
infos = [lm contactInfosForUserWithUIDorEmail: user];
|
||||
if (infos)
|
||||
@@ -144,6 +154,7 @@
|
||||
}
|
||||
|
||||
ASSIGN (userIDs, [allUsers objectsForKey: @"c_uid" notFoundMarker: nil]);
|
||||
DESTROY(pool);
|
||||
|
||||
return ([userIDs count] > 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user