Hi. I use Indy component for working with pop3. ( C++ Builder)
Code

Code:
if (mess->MessageParts->Items[inindex] is TIdAttachmentFile)
         { li=lvAttachments->Items->Add();
           li->ImageIndex=0;
           li->Caption=TIdAttachmentFile(mess->MessageParts->Items[inindex])->Filename;
           li->SubItems->Add(TIdAttachmentFile(mess->MessageParts->Items[inindex])->ContentType);
          }
if (mess->MessageParts->Items[inindex] is TIdAttachmentFile) { li=lvAttachments->Items->Add(); li->ImageIndex=0; li->Caption=TIdAttachmentFile(mess->MessageParts->Items[inindex])->Filename; li->SubItems->Add(TIdAttachmentFile(mess->MessageParts->Items[inindex])->ContentType); }
raises error on first line with message "If statement missing )"
Value mess is TIdMessage type.