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:
Francis Lachapelle
2010-11-10 20:12:54 +00:00
parent 3608035caa
commit 71e3e15091
+10 -5
View File
@@ -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;
}