1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 19:52:21 -05:00

IMAP: Send bodystructure with headers for iPhone request (BODYSTRUCTURE BODY.PEEK[HEADER])

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@693 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-09-02 22:24:53 +00:00
parent 8fa03fb247
commit d2e2e5ee3c

View File

@ -520,6 +520,12 @@ public class ImapConnection extends AbstractConnection {
PartOutputStream partOutputStream = new PartOutputStream(baos, true, false, 0); PartOutputStream partOutputStream = new PartOutputStream(baos, true, false, 0);
message.write(partOutputStream); message.write(partOutputStream);
baos.close(); baos.close();
if (bodystructure) {
bodystructure = false;
// Apple Mail: need to build full bodystructure
appendBodyStructure(buffer, baos);
}
buffer.append(" RFC822.SIZE ").append(partOutputStream.size); buffer.append(" RFC822.SIZE ").append(partOutputStream.size);
if ("BODY.PEEK[HEADER]".equals(param)) { if ("BODY.PEEK[HEADER]".equals(param)) {
buffer.append(" BODY[HEADER] {"); buffer.append(" BODY[HEADER] {");
@ -555,6 +561,7 @@ public class ImapConnection extends AbstractConnection {
baos.close(); baos.close();
if (bodystructure) { if (bodystructure) {
bodystructure = false;
// Apple Mail: need to build full bodystructure // Apple Mail: need to build full bodystructure
appendBodyStructure(buffer, baos); appendBodyStructure(buffer, baos);
} }