PowerTCP Mail for .NET
Update Method (ImapMessage)
Example 




Use true to add the flags and false to remove them.
ImapFlags value specifying the flag(s) to modify.
Updates the specified flag value on the server.
Syntax
Public Function Update( _
   ByVal set As Boolean, _
   ByVal flags As ImapFlags _
) As ImapResponse
Dim instance As ImapMessage
Dim set As Boolean
Dim flags As ImapFlags
Dim value As ImapResponse
 
value = instance.Update(set, flags)
public ImapResponse Update( 
   bool set,
   ImapFlags flags
)
public: ImapResponse* Update( 
   bool set,
   ImapFlags flags
) 
public:
ImapResponse^ Update( 
   bool set,
   ImapFlags flags
) 

Parameters

set
Use true to add the flags and false to remove them.
flags
ImapFlags value specifying the flag(s) to modify.
Remarks
Use the Mailbox.Update() methods to modify flags on sets of messages.
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