IMAP: Fake subscribe/unsubscribe responses

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@332 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-02-05 16:06:34 +00:00
parent f15d9c25e4
commit 3c359b717a
2 changed files with 5 additions and 4 deletions

View File

@ -460,10 +460,9 @@ public class ExchangeSession {
* @param messageName message name
* @param properties message properties (flags)
* @param messageBody mail body
* @param allowOverwrite allow existing message overwrite
* @throws java.io.IOException when unable to create message
*/
public void createMessage(String folderUrl, String messageName, HashMap<String, String> properties, String messageBody, boolean allowOverwrite) throws IOException {
public void createMessage(String folderUrl, String messageName, HashMap<String, String> properties, String messageBody) throws IOException {
String messageUrl = URIUtil.encodePathQuery(folderUrl + "/" + messageName + ".EML");
PropPatchMethod patchMethod;
// create the message first as draft
@ -806,7 +805,7 @@ public class ExchangeSession {
String messageName = UUID.randomUUID().toString();
createMessage(draftsUrl, messageName, properties, mailBuffer.toString(), false);
createMessage(draftsUrl, messageName, properties, mailBuffer.toString());
// warning : slide library expects *unencoded* urls
String tempUrl = draftsUrl + "/" + messageName + ".EML";

View File

@ -326,7 +326,7 @@ public class ImapConnection extends AbstractConnection {
readClient();
String messageName = UUID.randomUUID().toString();
session.createMessage(session.getFolderPath(folderName), messageName, properties, new String(buffer), false);
session.createMessage(session.getFolderPath(folderName), messageName, properties, new String(buffer));
sendClient(commandId + " OK APPEND completed");
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
if (currentFolder != null) {
@ -336,6 +336,8 @@ public class ImapConnection extends AbstractConnection {
sendClient("* " + currentFolder.objectCount + " RECENT");
}
sendClient(commandId + " OK " + command + " completed");
} else if ("subscribe".equalsIgnoreCase(command) || "unsubscribe".equalsIgnoreCase(command)) {
sendClient(commandId + " OK " + command + " completed");
} else {
sendClient(commandId + " BAD command unrecognized");
}