Loading src/com/fsck/k9/mail/store/LocalStore.java +12 −2 Original line number Diff line number Diff line Loading @@ -1139,10 +1139,8 @@ public class LocalStore extends Store implements Serializable { LocalMessage localMessage = (LocalMessage)message; Cursor cursor = null; localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, "multipart/mixed"); MimeMultipart mp = new MimeMultipart(); mp.setSubType("mixed"); localMessage.setBody(mp); try { cursor = mDb.rawQuery("SELECT html_content, text_content FROM messages " Loading Loading @@ -1232,6 +1230,18 @@ public class LocalStore extends Store implements Serializable cursor.close(); } } if (mp.getCount() == 1) { BodyPart part = mp.getBodyPart(0); localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, part.getContentType()); localMessage.setBody(part.getBody()); } else { localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, "multipart/mixed"); localMessage.setBody(mp); } } } } Loading src/com/fsck/k9/mail/transport/SmtpTransport.java +5 −4 Original line number Diff line number Diff line Loading @@ -304,10 +304,11 @@ public class SmtpTransport extends Transport } message.setRecipients(RecipientType.BCC, null); executeSimpleCommand("DATA"); // TODO byte stuffing message.writeTo( new EOLConvertingOutputStream( new BufferedOutputStream(mOut, 1024))); EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream( new BufferedOutputStream(mOut, 1024)); message.writeTo(msgOut); // We use BufferedOutputStream. So make sure to call flush() ! msgOut.flush(); possibleSend = true; // After the "\r\n." is attempted, we may have sent the message executeSimpleCommand("\r\n."); Loading Loading
src/com/fsck/k9/mail/store/LocalStore.java +12 −2 Original line number Diff line number Diff line Loading @@ -1139,10 +1139,8 @@ public class LocalStore extends Store implements Serializable { LocalMessage localMessage = (LocalMessage)message; Cursor cursor = null; localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, "multipart/mixed"); MimeMultipart mp = new MimeMultipart(); mp.setSubType("mixed"); localMessage.setBody(mp); try { cursor = mDb.rawQuery("SELECT html_content, text_content FROM messages " Loading Loading @@ -1232,6 +1230,18 @@ public class LocalStore extends Store implements Serializable cursor.close(); } } if (mp.getCount() == 1) { BodyPart part = mp.getBodyPart(0); localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, part.getContentType()); localMessage.setBody(part.getBody()); } else { localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, "multipart/mixed"); localMessage.setBody(mp); } } } } Loading
src/com/fsck/k9/mail/transport/SmtpTransport.java +5 −4 Original line number Diff line number Diff line Loading @@ -304,10 +304,11 @@ public class SmtpTransport extends Transport } message.setRecipients(RecipientType.BCC, null); executeSimpleCommand("DATA"); // TODO byte stuffing message.writeTo( new EOLConvertingOutputStream( new BufferedOutputStream(mOut, 1024))); EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream( new BufferedOutputStream(mOut, 1024)); message.writeTo(msgOut); // We use BufferedOutputStream. So make sure to call flush() ! msgOut.flush(); possibleSend = true; // After the "\r\n." is attempted, we may have sent the message executeSimpleCommand("\r\n."); Loading