mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
Monotone-Parent: 33b0351ec935bf11e615865737fa2434e2208e1b
Monotone-Revision: 9618a3ef4b4d144965865ebb1d51bd446ca88dae Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-11-10T20:12:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -139,8 +139,9 @@
|
||||
addr = [NGInternetSocketAddress addressWithPort: port
|
||||
onHost: host];
|
||||
|
||||
if ([client connectToAddress: addr])
|
||||
NS_DURING
|
||||
{
|
||||
[client connectToAddress: addr];
|
||||
if ([client mailFrom: sender])
|
||||
{
|
||||
toErrors = [NSMutableArray array];
|
||||
@@ -167,13 +168,17 @@
|
||||
else
|
||||
result = [self _sendMailData: mailData withClient: client];
|
||||
}
|
||||
else
|
||||
result = [NSException exceptionWithHTTPStatus: 500
|
||||
reason: @"cannot send message:"
|
||||
@" (smtp) error when connecting"];
|
||||
[client quit];
|
||||
[client disconnect];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"Could not connect to the SMTP server %@ on port %d", host, port);
|
||||
result = [NSException exceptionWithHTTPStatus: 500
|
||||
reason: @"cannot send message:"
|
||||
@" (smtp) error when connecting"];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user