I Am writing Pop3 client for gmail. The problem is that when the email is downloaded then it deletes from pop3 server. I have tried sending RSET command to server but it dose not work.
Do i have to send RSET just before disconnecting or after downloading each mail?
It should only delete the messages if you send/use the DELE command. Since you're writing it yourself.. simply do not use the DELE command: http://www.faqs.org/rfcs/rfc1939.html
The RSET command should also work, too, see from the RFC linked:
RSET