0 votes

hi,
Below is my code.

try
{
    Pop3 pop = new Pop3();
    pop.ConnectSSL("outlook.office365.com");
    log("Opening POP : ");
    pop.UseBestLogin("username","password");

    List<string> TotalpopMail = pop.GetAll();
    foreach (string uId in TotalpopMail)
    {
        pop.DeleteMessageByUID(uId);
    }
    pop.Close();
}
catch (Exception ex)
{
    log(ex.message);
}         

no exceptions, but mail is not deleting.
It was working for last 2 months, now it is not working.

by

1 Answer

0 votes

Please turn on and examine the logs:
https://www.limilabs.com/blog/logging-in-mail-dll

If it worked before and stopped, the problem is rather on the server side.

Is there a reason you use POP3 instead of IMAP?

by (297k points)
...