I am using OpenPop.Net POP3 Library to fetch emails from POP server. But when I am trying to delete a email, it doesnt work. I tried everything mentioned the documentation. Here is the sample code:
Pop3Client pop3Client = new Pop3Client();
pop3Client.Connect('pop.gmail.com', 995, true);
pop3Client.Authenticate('*******', '*******');
int count = pop3Client.GetMessageCount();
for (int i = count; i >= 1; i--)
{
Message message = pop3Client.GetMessage(i);
pop3Client.DeleteMessage(i);
pop3Client.Disconnect();
break; //deleting only one message
}
DeleteMessage function does not work, it does not give any exception too.