Attachment empty..Indy 9

Giganews Newsgroups
Subject: Attachment empty..Indy 9
Posted by:  Alain (a.mara…@astriadev.com)
Date: Thu, 23 Oct 2003

I receive Mail from Outlook 2000 (all patchs applied).
The mail is
- text
- without Body
- only 1 File Attachment (text).
I Retrieve mail, find one attachment and SaveToFile, File saved is empty (0
ko) !!!
If  I read with Outlook or other mailer I can save this file (2 Ko).
If mail has a body with at least 1 character it works fine!

Any Ideas ???

Thanks

W2000/D6/Indy 9.0.14 (component TIdPop3,TIdMessage)

Program is like :

POP.Retrieve(index,msg);
....
for iPart := 0 to Pred(Msg.MessageParts.Count) do
begin
    if (Msg.MessageParts.Items[iPart] is TIdAttachment) then
    begin
        .....

TIdAttachment(Msg.MessageParts.Items[iPart]).SaveToFile(SaveDialog1.FileName
);
        ....
    end;
end;

Replies