Retrieving a message does not remove the message from the POP3 server. A further
call to LIST will still return the message. To remove a message from POP3 server,
you have to call the Delete
method.
public void Delete(Pop3Message rhs)
{
string message;
string response;
message = "DELE " + rhs.number + "\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}
}
The Delete method sends a DELE
message with the message number
to the POP3 server. The server will respond with the +OK
acknowledgment
message, if successful.
Comments