This should be a really simple script.
I have 2 Google Apps accounts. I want to be able to label messages in my main account with a specific label, then have the script periodically copy messages in that account to the inbox of another account. It then needs to remove the labels from the messages in the original account so they're not copied again the next time the cron job kicks off the script.
I figure this should be fairly straightforward to do via IMAP.
I found a script online designed to move all messages and folders from one IMAP account to another for a migration, but this is obviously a lot more complicated than I need. I'm not smart enough to redo it for my needs, but it may prove useful as a starting point:
[url removed, login to view]
I'd like there to be a header in the script that I can edit myself to set variables pertaining to the account info and folders.
So, in a little more detail:
1. The script should have a header where I can set the origin and destination accounts and folders
2. It logs into both accounts, then copies all messages from a specific IMAP folder on the origin side to a specific folder on the destination side
3. Removes the messages from the folder in the original account without deleting them or effecting their other Gmail labels
That's about it. Thanks!