Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin - WeOnlyDo Discussion board

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin (General questions)

by Eric Dahlvang, Thursday, August 20, 2009, 16:24 (5528 days ago) @ wodDamir

The following conversation is between the wodimap sample server and windows mobile 6. Windows mobile doesn't care if the size of the text and html is returned as zero for a fetch, it will still request the body later. However, other imap clients aren't so forgiving. Iphone 3G will not request the body if the BODYSTRUCTURE has zero for the size.

[code]
A2 NOOP
* OK [CAPABILITY IMAP4REV1] WeOnlyDo! COM Imap server version DEMO 2.2.2.104 ready.
A2 OK NOOP completed
A3 CAPABILITY
* CAPABILITY IMAP4REV1
A3 OK CAPABILITY completed
A4 LOGIN xxx@xxx.com xxxx
A4 OK LOGIN completed
A5 NAMESPACE
A5 BAD Command unrecognized
A6 LIST
* LIST () / INBOX
* LIST () / Sent Items
A6 OK LIST completed
A7 LIST Sent Items/ *
* LIST () /sent items Sent Items
A7 OK LIST completed
A8 LIST INBOX/ *
* LIST () /inbox INBOX
A8 OK LIST completed
A9 SELECT INBOX
* FLAGS (Seen Answered Deleted Flagged Draft Recent)
* 4 EXISTS
* 0 RECENT
* OK [UNSEEN 2] first unseen
* OK [UIDVALIDITY 1250632058] UIDs valid
* OK [PERMANENTFLAGS (Seen Answered Deleted Flagged Draft)]
A9 OK [READ-WRITE] SELECT completed
A10 FETCH 1:4 (UID FLAGS BODY.PEEK[HEADER.FIELDS (MESSAGE-ID)])
* 1 FETCH (UID 0 FLAGS (Seen) BODY[HEADER.FIELDS (MESSAGE-ID)] {100}
Message-ID: <555861965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 2 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {85}
Message-ID: <444.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 3 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {98}
Message-ID: <3331965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 4 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {98}
Message-ID: <2221965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
A10 OK FETCH completed
A11 FETCH 1:4 (INTERNALDATE UID FLAGS RFC822.SIZE BODY.PEEK[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] BODYSTRUCTURE)
* 1 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS (Seen) RFC822.SIZE 145903 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {236}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <555861965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 2 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145888 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {221}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <444.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 3 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145901 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {234}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <3331965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 4 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145901 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {234}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <2221965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUC


Complete thread: