Click or drag to resize

ImapClientDeleteMessage Method (Int32, Boolean)

Deletes the specified message.

Namespace:  GemBox.Email.Imap
Assembly:  GemBox.Email (in GemBox.Email.dll) Version: 13.0.35.1012
Syntax
public void DeleteMessage(
	int messageNumber,
	bool expunge
)

Parameters

messageNumber
Type: SystemInt32
The message number.
expunge
Type: SystemBoolean
True to delete message immediately from the server; otherwise, false.
Exceptions
ExceptionCondition
InvalidOperationException No folder is selected or Client is not connected or Server error.
ArgumentOutOfRangeException Message number is out of range.
Remarks
Setting expunge to true will delete specified message from the server and that message cannot be undeleted. By setting expunge to false, specified message will just be marked for deletion, but it won't be removed from the server until Expunge is called.
See Also