[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-javamail] Re: Q: Building complex MIME messages
From: |
Chris Burdess |
Subject: |
Re: [Classpathx-javamail] Re: Q: Building complex MIME messages |
Date: |
Sun, 3 Jul 2005 17:27:18 +0100 |
User-agent: |
Mutt/1.3.28i |
Adam Bradley wrote:
> >>>>I've been writing a little application which will help me move from my
> >>>>current remote mailbox format to a different format, mbox.
> >>>>
> >>>>My 'example' source message is the following
> >>>>
> >>>> 1
> >>>> / \
> >>>> 2 3 (file)
> >>>> / \
> >>>> 4 5
> >>>> / \ / \
> >>>> 6 7 8 9
> >>>> (file) \ \
> >>>> 11 10
> >>>> \
> >>>> 12
> >>>>
> >>>>Does anyone have any grand ideas how I might go about doing this?
> >>>>Current I'm going through each message in turn and recording what the
> >>>>MessageID(s) of its children and prepending the previous entry such
> >>>>that:
> >>>>
> >>>>1 2,3
> >>>>2 4,5,3
> >>>>4 6,7,5,3
> >>>>6 -,7,5,3
> >>>>7 11,5,3
> >>>>11 5,3
> >>>>5 8,9,3
> >>>>8 -,9,3
> >>>>9 10,3
> >>>>10 -,3
> >>>>3 -
> >>>>
> >>>
> >>>>From this, I want to build a MIME message and maintain the hierarchy
> >>>
> >>>>within the subsequent message.
>
> Each number represents a message within the main message, with 3 and 6
> file attachments.
So each message (apart from the leaves) has a Content-Type of
multipart/mixed, and its content is a MimeMultipart object. The
MimeMultiparts contain MimeMessages (of MIME type message/rfc822) and
other content types (the "files"), whatever they are. The leaf messages
have some other Content-Type, maybe text/plain.
Or maybe it's more complex than that? The superordinate messages contain
text as well as other messages? If so, that text is part of its
MimeMultipart content.
--
Chris Burdess