PowerTCP Mail for .NET
Deleted Property (ImapMessage)
Example 




Returns the value of the Delete flag on the server. Use Update to modify its value.
Syntax
Public ReadOnly Property Deleted As Boolean
Dim instance As ImapMessage
Dim value As Boolean
 
value = instance.Deleted
public bool Deleted {get;}
public: __property bool get_Deleted();
public:
property bool Deleted {
   bool get();
}

Property Value

True if the message has been marked for deletion, false otherwise. The default value is false.
Remarks

Marked messages are expunged when Mailbox.Purge is called, SelectedMailbox is set to null, or Close is used.

Use the Mailbox.Update() methods to modify flags on sets of messages.

Returns a default value if its value has not been populated with Get.

Example
This example demonstrates setting the delete flag on one message on an Imap server.
/// <summary>
/// Sets the delete flag for the specified email. Email will be deleted by calling 
/// Mailbox.Purge(), or upon logout.
/// </summary>
/// <param name="message">Message to set the delete flag for.</param>
public void DeleteMessage(ImapMessage message)
{
    message.Update(true, ImapFlags.Deleted);
}
''' <summary>
''' Sets the delete flag for the specified email. Email will be deleted by calling 
''' Mailbox.Purge(), or upon logout.
''' </summary>
''' <param name="message">Message to set the delete flag for.</param>
Public Sub DeleteMessage(ByVal message As ImapMessage)
    message.Update(True, ImapFlags.Deleted)
End Sub
See Also

Reference

ImapMessage Class
ImapMessage Members


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic