Problem decoding an email

Giganews Newsgroups
Subject: Problem decoding an email
Posted by:  Lis (
Date: Tue, 8 Jun 2004

  I use Indy 10 (snapshot downloaded on 31/5) and I notice that works much better than release 9 decoding mails.
The only problem I found in some days of normal use of my application is related to the email that I will attach to a message in this thread.
After retrieving the message, the IdMessage object contain 5 parts: 4 TIdText and 1 TIdAttachmentFile, but the mail contain 2 Attachments.

Is this a known bug? I read the mail in this way:

if POP3.Retrieve(MsgIndex, Msg) then begin
  if Msg.MessageParts.Count > 1 then begin
    for i := 0 to Msg.MessageParts.Count - 1 do begin
      if Msg.MessageParts.Items[i] is TIdText then begin
        //is Text part?
        if AnsiStartsText('text/html', Msg.MessageParts.Items[i].ContentType) then
          //treat html text
          //treat normal text
      end else if Msg.MessageParts.Items[i] is TIdAttachmentFile then begin
    //treat attachment
    end; //for i := 0 to Msg.MessageParts.Count - 1

Aiuta la ricerca contro il cancro: