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:
parent
f15d9c25e4
commit
3c359b717a
|
@ -460,10 +460,9 @@ public class ExchangeSession {
|
||||||
* @param messageName message name
|
* @param messageName message name
|
||||||
* @param properties message properties (flags)
|
* @param properties message properties (flags)
|
||||||
* @param messageBody mail body
|
* @param messageBody mail body
|
||||||
* @param allowOverwrite allow existing message overwrite
|
|
||||||
* @throws java.io.IOException when unable to create message
|
* @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");
|
String messageUrl = URIUtil.encodePathQuery(folderUrl + "/" + messageName + ".EML");
|
||||||
PropPatchMethod patchMethod;
|
PropPatchMethod patchMethod;
|
||||||
// create the message first as draft
|
// create the message first as draft
|
||||||
|
@ -806,7 +805,7 @@ public class ExchangeSession {
|
||||||
|
|
||||||
String messageName = UUID.randomUUID().toString();
|
String messageName = UUID.randomUUID().toString();
|
||||||
|
|
||||||
createMessage(draftsUrl, messageName, properties, mailBuffer.toString(), false);
|
createMessage(draftsUrl, messageName, properties, mailBuffer.toString());
|
||||||
|
|
||||||
// warning : slide library expects *unencoded* urls
|
// warning : slide library expects *unencoded* urls
|
||||||
String tempUrl = draftsUrl + "/" + messageName + ".EML";
|
String tempUrl = draftsUrl + "/" + messageName + ".EML";
|
||||||
|
|
|
@ -326,7 +326,7 @@ public class ImapConnection extends AbstractConnection {
|
||||||
readClient();
|
readClient();
|
||||||
|
|
||||||
String messageName = UUID.randomUUID().toString();
|
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");
|
sendClient(commandId + " OK APPEND completed");
|
||||||
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
||||||
if (currentFolder != null) {
|
if (currentFolder != null) {
|
||||||
|
@ -336,6 +336,8 @@ public class ImapConnection extends AbstractConnection {
|
||||||
sendClient("* " + currentFolder.objectCount + " RECENT");
|
sendClient("* " + currentFolder.objectCount + " RECENT");
|
||||||
}
|
}
|
||||||
sendClient(commandId + " OK " + command + " completed");
|
sendClient(commandId + " OK " + command + " completed");
|
||||||
|
} else if ("subscribe".equalsIgnoreCase(command) || "unsubscribe".equalsIgnoreCase(command)) {
|
||||||
|
sendClient(commandId + " OK " + command + " completed");
|
||||||
} else {
|
} else {
|
||||||
sendClient(commandId + " BAD command unrecognized");
|
sendClient(commandId + " BAD command unrecognized");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue