GraphClient.DeleteMessageAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Graph.dll (version 8.0.9673)
DeleteMessageAsync(GraphMessageId)
Deletes a message with the specified ID. The message is soft-deleted (moved into the 'Deletions' subfolder of the 'Recoverable Items' folder).
Declaration
public Task DeleteMessageAsync(GraphMessageId id)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphMessageId | id | ID of a message to delete. |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Soft-deleted messages in the 'Deletions' subfolder can be accessed using Deletions.
To permanently delete a message, use DeleteMessage(GraphMessageId, Boolean) overload.
Examples
See DeleteMessage code example on product pages.
DeleteMessageAsync(GraphMessageId, Boolean)
Deletes a message with the specified ID.
Declaration
public Task DeleteMessageAsync(GraphMessageId id, bool permanent)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphMessageId | id | ID of a message to delete. |
| Boolean | permanent | True to delete the message permanently (hard-delete); false to move it to 'Deletions' (soft-delete). |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Soft-deleted messages are moved to the 'Deletions' subfolder of the 'Recoverable Items' folder. They can be accessed using Deletions.
Permanently deleted (hard-deleted) messages are placed in the purges folder in the dumpster in the user's mailbox. They can no longer be accessed by e-mail clients and are permanently removed based on the configured retention policy of the mailbox. By default, deleted messages are retained for 14 days.
Examples
See DeleteMessage code example on product pages.