Delete Messages from Exchange Server using WebDav
Contents
[
Hide
]
You can delete email messages from a folder with the help of the ExchangeClient.deleteMessage() method. It takes the message’s unique URI as a parameter.
The sample code below deletes a message from the Inbox folder. For the purpose of this example, the code:
- Reads messages from the Inbox folder.
- Process messages based on some criteria (in this example, we find a keyword in the message subject).
- Delete the message.