I have a custom mail handler which is currently processing emails and deleting them when complete. However, we’re recently had some bad payloads sent to the email and the source is reporting the payload being sent is correct, but to troubleshoot exactly where the problem is, we’d like to preserve the suspect email rather than deleting it. The idea was to move the email to a subfolder of the Inbox. MessageHandlerExecutionMonitor is how we’re marking messages for deletion, so that was the logical place to look for a method to move an email, but it doesn’t appear to support that functionality.
In another application where I wrote a custom JavaMail implementation, I’m able to accomplish this by using the Folder.copyMessages method. Is there something similar in the Atlassian SDK I could use?