Created
June 27, 2013 14:47
-
-
Save lumaxis/5877028 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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