On Thu, 15 Jan 2004, Paul Jarc wrote: > Please confirm my understanding here. In a text/plain message, > BODY[TEXT] and BODY[1.TEXT] refer to the same data (the message body), > and BODY[] and BODY[1] refer to the same data (the full message, > header and body).
No. In a text/plain message, BODY[TEXT] and BODY[1] refer to the same data (the message body). BODY[] refers to the full message. BODY[1.TEXT] is meaningless since the first part isn't MESSAGE/RFC822. > But in a multipart/* message which contains a > message/rfc822 part as its only part, BODY[TEXT] refers to the body of > the outer multipart message BODY[TEXT] refers to the message body. It's the same as RFC822.TEXT, disregarding any MIME structure. > while BODY[1] refers to the encapsulated > message/rfc822 part *without* the surrounding MIME boundaries or extra > header Correct. > and BODY[1.TEXT] refers to only the body of the inner > message/rfc822 part Yes, it refers to what would be the RFC822.TEXT of the encapsulated message, disregarding any MIME structure inside that message. > Given a message with the following MIME structure, are these part > specifier comments correct? Someone else is going to have to check that for you. I suggest that you take a message and feed it to a known working IMAP server (such as UW imapd), and do some experiments with various body parts until you understand how it works. An excellent playpen is the MIME torture test message on ftp://ftp.cac.washington.edu/mail/mime/torture-test.mbox -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.