Sorry this is B ug: Savetofile with > 600kb

Giganews Newsgroups
Subject: Sorry this is B ug: Savetofile with > 600kb
Posted by:  Karl Estermann (k…@aals.ch)
Date: Wed, 21 Apr 2004

Hi, i try to save a Messagepart to file with this code from the Indy
Maildemo:
it works, but the size of the file is 605 kb it should be 1.2 mb. I try more
then one file, all file how greather then 550kb, the code save only 605kb.
any help?
  for intIndex := 0 to lvMessageParts.Items.Count - 1 do
      if lvMessageParts.Items[intIndex].Selected then
        begin
            //now find which TIdAttachment it is in MSG
            intMSGIndex :=
FindAttachment(lvMessageParts.Items[intIndex].caption);
            if intMSGIndex > 0 then
              begin
                  fname := FAttachPath +
TIdAttachment(Msg.MessageParts.Items[intMSGIndex]).filename;
                  SaveDialog1.FileName := fname;
                  if SaveDialog1.Execute then
                    begin
                        Showbusy(true);

TIdAttachment(Msg.MessageParts.Items[intMSGIndex]).SaveToFile(SaveDialog1.Fi
leName);
                        Showbusy(false);
                    end;
              end;
        end;
end;

Replies