We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to delete a message just copied by IMAPClient.CopyMessage

Using Aspose.Email.dll 18.8.0.0

I am copying a Message to a subfolder using
newUID = ImapClient.CopyMessage(uniqueId, subfolder);

later on in the code i decide to delete either the source message by
ImapClient.DeleteMessage(uniqueId);
or to delete the copied message, just created some lines above:
ImapClient.DeleteMessage(newUID);

But latter is not working. I assume that newUID ist the uniqueId of the new created message.
Am i wrong with this assumption?

How can i manage this process?

regards
Andreas Look

@alook,

After the message is copied to a subfolder, you will have to select that subfolder to delete the copied message. You can select the subfolder using the snippet given below.

// imapClient is an object of ImapClient
imapClient.SelectFolder(subfolder);

Thanks. This works like a charme.