1

In openpop we must call disconnect() or disposed() to submit the delete command, how to delete the messages immediately when call pop3Client.DeleteMessage()?

laylarenee
  • 3,276
  • 7
  • 32
  • 40
chris dan
  • 11
  • 1
  • 2

1 Answers1

6

I am a developer for OpenPOP.

The POP3 RFC states that you can send a DELE <messagenumber> command to the POP3 server, and the the message with that number will be marked as deleted, but only first deleted when the POP3 client enters the UPDATE state, which happens when the POP3 client sends the QUIT command. When the QUIT command is sent, the POP3 client can only disconnect from there. When you call Disconnect() on the OpenPOP POP3 client, then the QUIT command is sent and the client disconnects. Dispose() will internally call Disconnect() for you.

This means that there is no way to delete messages immediately, since this is how POP3 works.

Community
  • 1
  • 1
foens
  • 8,642
  • 2
  • 36
  • 48