Click or drag to resize

ImapClientDeleteMessage Method (String, Boolean)

Deletes the specified message.

Namespace:  GemBox.Email.Imap
Assembly:  GemBox.Email (in GemBox.Email.dll) Version: 13.0.35.1008
Syntax
public void DeleteMessage(
	string uid,
	bool expunge
)

Parameters

uid
Type: SystemString
The message id.
expunge
Type: SystemBoolean
True to delete message immediately from the server; otherwise, false.
Exceptions
ExceptionCondition
InvalidOperationException No folder is selected or UID operations are not supported or Client is not connected or Server error.
ArgumentException Message id is null or empty.
Remarks
Setting expunge to true will specified delete 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