mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Fix sendMail regression after IMAP implementation
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@326 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
db381db85b
commit
e9f138238a
@ -507,17 +507,19 @@ public class ExchangeSession {
|
||||
}
|
||||
|
||||
// add bcc and other properties
|
||||
patchMethod = new PropPatchMethod(messageUrl);
|
||||
try {
|
||||
// update message with blind carbon copy and other flags
|
||||
addProperties(patchMethod, properties);
|
||||
int statusCode = wdr.retrieveSessionInstance().executeMethod(patchMethod);
|
||||
if (statusCode != HttpStatus.SC_MULTI_STATUS) {
|
||||
throw new IOException("Unable to patch message " + messageUrl + ": " + statusCode + " " + patchMethod.getStatusLine());
|
||||
}
|
||||
if (properties.size() > 0) {
|
||||
patchMethod = new PropPatchMethod(messageUrl);
|
||||
try {
|
||||
// update message with blind carbon copy and other flags
|
||||
addProperties(patchMethod, properties);
|
||||
int statusCode = wdr.retrieveSessionInstance().executeMethod(patchMethod);
|
||||
if (statusCode != HttpStatus.SC_MULTI_STATUS) {
|
||||
throw new IOException("Unable to patch message " + messageUrl + ": " + statusCode + " " + patchMethod.getStatusLine());
|
||||
}
|
||||
|
||||
} finally {
|
||||
patchMethod.releaseConnection();
|
||||
} finally {
|
||||
patchMethod.releaseConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
String commandId = null;
|
||||
StringTokenizer tokens;
|
||||
try {
|
||||
ExchangeSessionFactory.checkConfig();
|
||||
sendClient("* OK [CAPABILITY IMAP4REV1 AUTH=LOGIN] IMAP4rev1 DavMail server ready");
|
||||
for (; ;) {
|
||||
line = readClient();
|
||||
@ -368,6 +369,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
}
|
||||
}
|
||||
// skip optional date
|
||||
// TODO : replace datereceived
|
||||
String dateOrSize = tokens.nextToken();
|
||||
if (tokens.hasMoreTokens()) {
|
||||
dateOrSize = tokens.nextToken();
|
||||
@ -428,7 +430,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
if (commandId != null) {
|
||||
sendClient(commandId + " BAD unable to handle request: " + e.getMessage());
|
||||
} else {
|
||||
sendClient("* BAD unable to handle request: " + e.getMessage());
|
||||
sendClient("* BYE unable to handle request: " + e.getMessage());
|
||||
}
|
||||
} catch (IOException e2) {
|
||||
DavGatewayTray.warn("Exception sending error to client", e2);
|
||||
|
Loading…
Reference in New Issue
Block a user