Delete Messages from Exchange Server using WebDav

Contents
[ ]

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:

  1. Reads messages from the Inbox folder.
  2. Process messages based on some criteria (in this example, we find a keyword in the message subject).
  3. Delete the message.