Getting many more messages than there are

Giganews Newsgroups
Subject: Getting many more messages than there are
Posted by:  Christian Tiberg (christi…@commsoft.nu)
Date: Wed, 9 Feb 2005

Hello!

We're using the following code:

  Msgs := Cli.CheckMessages;
if Msgs > 0 then
  begin
  try
    Cli.UIDL(Lst);
  except
    // Handling
  end;
  for i := 0 to Lst.Count - 1 do
    begin
    DoStatus(Format('Checking mail %d of %d on %s', [i + 1, Lst.Count,
CurrAccount]));
    // Preamble
        MsgNum := StrToIntDef(Copy(Lst[i], 1, ix - 1), i + 1);
        Msg := TIdMessage.Create;
        try
          Cli.Retrieve(MsgNum, Msg);
        except
          on E: Exception do
          begin
            CheckerThread.ErrorOccurred(E.Message, CurrAccount);
            Msg.Free;
            Dispose(AMess);
            continue;
          end;
        end;
    end;
end;

Sometimes, we get *a lot* of messages from the Cli.UIDL call, but nothing
seems to come from the call to get the message. Does anyone know what can
cause this?

Best regards,
  Christian Tiberg, CommSoft

Replies