Sounds like you need to learn how exceptions work.
Connect() fails, an exception is raised. Several
different exception types are possible, including
EIdSocketError, which contains the socket error code.
If a POP3/SMTP command fails, an
is raised. The exception contains the server's response code and message.
This information is also available in the component's