Move Messages from One Folder to Another using WebDav
Contents
[
Hide
]
You can move email messages from one folder to another with the help of the ExchangeClient.moveMessage() method. It takes the parameters:
- The unique URI of the message which is to be moved.
- The unique URI of the destination folder.
Move Messages between Folders
The sample code below that moves a message in a mailbox from the Inbox folder to a folder called Processed. In this example, the application:
- Reads messages from the Inbox folder.
- Processes some of the messages based on some criteria (in this example, we find a keyword in the message subject).
- Moves messages which fulfill the given condition to the Processed folder.