Moved message is still in folder but hidden (using Gmail IMAP)
I have an Applescript that adds an Omnifocus task based on an email in one folder, then moves the message to another... when this happens in Mail the message in the original folder is no longer there and is moved to the new folder, and the task is added to Omnifocus. I run this every 5 minutes. It all seems to be working.
Until the next 5 minutes that is... then the task is added again. Applescript thinks the message is still in the original folder.
So I checked GMail and the message IS still in there! The message in GMail still has the original label (the folder in Mail) AND the new label (the folder it is moved to). But it is not showing in the old folder in mail.
So the task is added again every 5 minutes.
Does anyone know why Mail does this, i.e. makes me think the email is moved (not appearing in the folder) but it actually is in the folder? It messes up the Applescript.
Thanks a lot
iMac, Mac OS X (10.7.3)