From 8bfd6ca3e01858fa6a58f199a140e8d6adda462c Mon Sep 17 00:00:00 2001 From: Dominik Heidler Date: Fri, 28 Feb 2014 17:02:05 +0100 Subject: [PATCH] Fix sendCommand line splitup for some imap proxys When sending a command it would be sent like this: PKG1: 1 STARTTLS PKG2: \r\n Some imap proxys (maybe from Fortinet?) don't accept commands across packets: PKG1: 1 STARTTLS\r\n --- src/com/fsck/k9/mail/store/ImapStore.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 87a0c2fb4..f9ecd9761 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -2779,10 +2779,8 @@ public class ImapStore extends Store { try { open(); String tag = Integer.toString(mNextCommandTag++); - String commandToSend = tag + " " + command; + String commandToSend = tag + " " + command + "\r\n"; mOut.write(commandToSend.getBytes()); - mOut.write('\r'); - mOut.write('\n'); mOut.flush(); if (K9.DEBUG && K9.DEBUG_PROTOCOL_IMAP) {