Wrap the call to CheckMessages into a try...except block and then see what
the LastCmdResult property actually contains, to see why the parsing is
Do you mean that you are writing your own POP3 server as well? If so, then
please show that code as well. I would suspect that because you are not
actually handling the username/password yet, then you are messing up the
response sequence for the TIdPop3, since TIdPOP3 is going to issue "USER"
and "PASS" commands whether your server is handling them or not. If you not
validating the login and setting the Transaction state accordingly, that
will probably cause the "STAT" command handler to fail, ("STAT" is the
command that CheckMessages() sends to the server).
Use the OnBeforeCommandHandler event.