Back in the good ole days, you could use your telnet client (or netcat) to check most services. For example, a mail account via POP3:
$ telnet pop.mailserver.tld 110 +OK [...] user username +OK [...] pass yourpassword +OK [...] list [...] quit
Today many servers require a secure connection, so that your data (including username and password!) won’t be readable by anyone snooping your connection. It’s a good security policy, but telnet is not able to speak to secure services. You should use Openssl instead:
$ openssl s_client -connect pop.mailserver.tld:995 [...] +OK [...] user username [...]
It also works on different services, for example HTTP:
$ openssl s_client -connect google.com:443 [...] --- GET / HTTP/1.0 HTTP/1.0 302 Found Location: https://www.google.it/ [...]
Using this command you can easily check and debug your secure POP, IMAP, HTTP services.