See ChangeLog
Monotone-Parent: 53a3680b094640a96987cce96326daad38a619e0 Monotone-Revision: 4b96a79ded99473f7c6766140d0cd061fbf033cf Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-12-26T16:01:08 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
ec868276aa
commit
e2e53b5a53
|
@ -1,3 +1,12 @@
|
|||
2009-12-26 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* 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
|
||||
|
||||
2009-12-25 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Tools/SOGoToolBackup.m (-fetchUserIDs:):
|
||||
|
|
|
@ -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])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue