Pop3DeleteMessages Method |
Flags all the messages in the inbox for deletion from the server.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public bool DeleteMessages()
Public Function DeleteMessages As Boolean
Return Value
Type:
Booleantrue if the messages have been flagged for deletion or the inbox
is empty; otherwise,
false.
Exceptions Remarks
If the POP3 server supports pipelining, this method will flag all the messages in a single network operation,
which greatly increases performance and reduces network traffic.
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. |
Examples This sample deletes all the messages in the inbox.
using MailBee;
using MailBee.Pop3Mail;
Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
pop.Login("jdoe", "secret");
pop.DeleteMessages();
pop.Disconnect();
Imports MailBee
Imports MailBee.Pop3Mail
Dim pop As New Pop3
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret")
pop.DeleteMessages()
pop.Disconnect()
See Also