Take a look at that RFC I have mentioned. ftp://ftp.rfc-editor.org/in-notes/rfc1225.txt They wrote an example POP3 Session, I had extended it a bit with some comments for you: S: ... C: S: +OK dewey POP3 server ready (Comments to: PostMaster@UDEL.EDU) C: USER mrose S: +OK mrose is a real hoopy frood C: PASS secret S: +OK mrose's maildrop has 2 messages (320 octets) C: STAT S: +OK 2 320 now you know you have two messages in the server... C: LIST S: +OK 2 messages (320 octets) S: 1 120 S: 2 200 OK, so you know the size of the messages, you can select any message that exceeds the size of x to be deleted, or read it: S: . C: RETR 1 S: +OK 120 octets S: S: . ...or use TOP command: C: TOP 1 S: +OK S: S: . Now delete that message C: DELE 1 S: +OK message 1 deleted ...and continue iteration till you have finished with all mails... C: RETR 2 S: +OK 200 octets S: S: . C: DELE 2 S: +OK message 2 deleted C: QUIT S: +OK dewey POP3 server signing off (maildrop empty) C: S: That's as simple as that, just a matter of text parsing and to conversion from ascii to numeric (number of messages, size etc) Regards, Tamas -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist