Pop3DeleteMessage Method
Flags the specified message for deletion from the server.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public bool DeleteMessage(
	int index


Type: SystemInt32
The ordinal position of the message in the inbox. It must be in the range from 1 to InboxMessageCount. Can be negative in the range from -1 to -InboxMessageCount, i.e. -1 denotes the last e-mail in the inbox.

Return Value

Type: Boolean
true if the message has been flagged for deletion; otherwise, false.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
If more than one message is deleted, it's recommended to use DeleteMessages(Int32, Int32) method when possible, since it can operate much faster if the server supports pipelining.
Note Note
Messages flagged for deletion are actually removed from the server on Disconnect method call. Until this moment, the developer can remove the deletion status for all messages flagged as deleted by calling ResetDeletes method.
This sample deletes the first message from a user account on a POP3 server.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Pop3Mail;

// The actual code (put it into a method of your class).
Pop3 pop = new Pop3();
pop.Login("jdoe", "secret");
See Also