Determine if your mailserver is a POP3 or IMAP server. Its most probably a POP3 server so you have to telnet to it on port 110 (port 143 for IMAP).
C:>telnet my.mailserver.com 110
+OK POP3 server ready
USER myusername
+OK
PASS mysecret
+OK myusername has 2 messages (320 octets)
** Your now logged into the server and ready to read ya mail. You can see that you have two messages, they are called 1 and 2.
LIST
+OK 2 messages (320 octets)
RETR 1
+OK 120 octets
<contents of the message>
DELE 1
+OK message 1 deleted
QUIT
+OK my.mailserver.com POP3 server signing off
I doubt its IMAP but if it is I knock something similar up for IMAP
---
fug