Unrecognized POP3 Response Header

Giganews Newsgroups
Subject: Unrecognized POP3 Response Header
Posted by:  Lewis Howell (lou_junkma…@yahoo.com)
Date: Tue, 14 Sep 2004

I am just starting with POP3 and just trying to retrieve any messages as a
first test and delete as I retrieve.  The exception is thrown on Connect.
Any pointers would be greatly appreciated.  Here is some information...

Environment:
9.0.14
Delphi 5

TIdLogEvent (this is all that I get):
AText= 9/14/2004 9:26:17 AM
AData= 220 host31.christianwebhost.com ESMTP Sendmail 8.12.10/8.12.10; Tue,
14 Sep 2004 09:25:04 -0400<EOL>

My code:
<snip>
var
  MsgCnt : Integer;
begin
  try
    if IdPOP31.Connected then
      IdPOP31.Disconnect;
    IdPOP31.Host := HostString;
    IdPOP31.Port := 25;
    IdPOP31.Username := UsernameString;
    IdPOP31.Password := PasswordString;
ShowMessage('IdPOP31 Ready');
    IdPOP31.Connect;
ShowMessage('IdPOP31.Connect');
    MsgCnt := IdPOP31.CheckMessages;
ShowMessage('IdPOP31.CheckMessages');
    while MsgCnt > 0 do
    begin
      ShowMessage(IntToStr(MsgCnt));
      IdPOP31.Retrieve(1, IdMessage1);
      ShowMessage(IdMessage1.Subject);
      IdPOP31.Delete(1);
      dec(MsgCnt);
    end;
  except
    IdPOP31.Disconnect;
    raise;
  end;
end;
<snip>

Replies