Re: Problems decoding multipart/related mails

Giganews Newsgroups
Subject: Re: Problems decoding multipart/related mails
Posted by:  Ciaran Costelloe (ccostell…@flogas.ie)
Date: Wed, 21 Apr 2004

I assume you are using Indy 10.

With Indy 10, the count will be 4 - the following part is also considered a
TIdText part (it can contain text):

------=_NextPart_000_006A_01C4279F.EF90E3F0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_006B_01C4279F.EF90E3F0"

This is a change from Indy 9.  The reason is that it allows proper nesting
of multipart messages down to any level: there is a new ParentPart property,
which (in this case) indexes the text/plain and text/html parts back to this
multipart/alternative part, which has a ParentPart of -1, i.e. the top
level.  Without having the maultipart/alternative part as a separate part to
hold the -1, you cannot do this indexing.  Using this indexing, the decoder
and encoder code can parse and generate multiparts inside multiparts inside
multiparts, etc., which Indy 9 was not able to do.

Ciaran

"Fran" <fsegov…@presenceco.com> wrote in message
news:806F85434A9AE240fsegov…@presenceco.com...
> Hi,
>
> I have problems when I retrieve a mail with multipart/related content. I
> retrieve de mail (attached as raw.txt) from the mail server. When the mail
> is decoded by the TIdMessage class, the MessageParts.Count is 4 when the
> correct value must be 3 (text/plain, text/html, image/gif). Also if I save
> the message with TIdMessage.SaveToFile I get the attached file decode.txt,
> if you open the file you can view that the MIME format of the mail is not
> correct, there are an additional boundary not processed
> (boundary="----=_NextPart_001_006B_01C4279F.EF90E3F0).
>
> It's a bug? there are any solution?
>
> Thank you and sorry for my bad english :-(
>
> Fran.

Replies

None

In response to

Problems decoding multipart/related mails posted by Fran on Wed, 21 Apr 2004