From 76f33ba5ff43463a854723aa1b5ca9c8d61484ae Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Thu, 18 Mar 2010 03:23:45 +0000 Subject: [PATCH] Fixes Issue 1330 Flush the output stream so that small messages have bodies. (And presumably so that the entirety of big messages are sent.) --- src/com/fsck/k9/mail/store/WebDavStore.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index df1f0a38c..4deb228bd 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -1977,9 +1977,10 @@ public class WebDavStore extends Store out = new ByteArrayOutputStream(); } open(OpenMode.READ_WRITE); - message.writeTo( - new EOLConvertingOutputStream( - new BufferedOutputStream(out, 1024))); + EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream( + new BufferedOutputStream(out, 1024)); + message.writeTo(msgOut); + msgOut.flush(); bodyEntity = new StringEntity(out.toString(), "UTF-8"); bodyEntity.setContentType("message/rfc822");