Hello there, we are attempting to use 360Works Email plugin to move an IMAP message to a different folder, specifically one that has been downloaded previously. The EmailMoveCurrentMessage command seems to be set up to work on the message currently being sent or on the last message rec'd. I am struggling to figure out how to move a message to another folder if that message was downloaded a few days ago, for instance.
Here's my current script. Any ideas? Thank you in advance! I am beginning to wrap my head around other parts of this plugin, but this in particular has kept me thinking for days and I'm not sure I feel any closer now than I did when I started!
#this establishes the connection to the IMAP server using 360Works script provided in example file
Perform Script [ “Connect Inbound” ]
#this script is run from the perspective of a single message
Set Variable [ $messageIDtoMove ; Value:EmailReadMessageValue (Message::messageId) ]
#readonly=false is there to ensure a message is moved, not copied
Set Variable [ $getMessage; Value:EmailReadMessages("readonly=false";"messageID=" & $messageIDtoMove) ]
#I'm thinking the error may be in this step, it doesn't make sense to me given the documentation...
Set Variable [ $result; Value:EmailGetNextMessage ]
#moves message to "Processed" folder, which is already on the IMAP server
Set Variable [ $moveResult ; Value:EmailMoveCurrentMessage ("Processed") ]
Thank you,
Stephen
PS - I am using Filemaker Pro Advanced 12 on Windows with Email plugin v. 2.17