Your script is amazingly dangerous. If something goes wrong in mail delivery, your script will still delete the mail from the pop server. You want to check the return code.. or better, just use a tried and tested tool like fetchmail.