Skip to content

Instantly share code, notes, and snippets.

@lumaxis
Created June 27, 2013 14:47
Show Gist options
  • Save lumaxis/5877028 to your computer and use it in GitHub Desktop.
Save lumaxis/5877028 to your computer and use it in GitHub Desktop.
tell application "Mail"
set _accounts to {account "Private", account "Monkeys"}
set _1ago to (current date) - 1 * days
set _3ago to (current date) - 3 * days
set _7ago to (current date) - 7 * days
repeat with _account in _accounts
set _inbox to mailbox "INBOX" of _account
set read status of (messages of mailbox "⌛1 Day" of _account) to false
set read status of (messages of mailbox "⌛3 Days" of _account) to false
set read status of (messages of mailbox "⌛7 Days" of _account) to false
move (messages of mailbox "⌛1 Day" of _account whose date received comes before _1ago) to _inbox
move (messages of mailbox "⌛3 Days" of _account whose date received comes before _3ago) to _inbox
move (messages of mailbox "⌛7 Days" of _account whose date received comes before _7ago) to _inbox
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment