In openpop we must call disconnect() or disposed() to submit the delete command, how to delete the messages immediately when call pop3Client.DeleteMessage()?
Asked
Active
Viewed 2,530 times
1 Answers
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.
-
Thanks foens! I was just going through your unit tests to try and figure this out. – Quinton Bernhardt Jun 17 '13 at 15:02