Can some one help me on how to delete a message after reading it.
I am using Gmail-Imap.
I could read the mail, read the attachments, but have no clue on how to delete a message.
Read this SO Post.
If you're using JavaMail, you should first move it to trash:
Folder trash = store.getFolder("[Gmail]/Bin");
for (Message m : msgs) {
inbox.copyMessages(new Message[] { m }, trash);
}