Skip to content

Instantly share code, notes, and snippets.

View cuberoot's full-sized avatar

Michael Taylor cuberoot

  • Adobe
  • Whangarei, New Zealand
View GitHub Profile
@cuberoot
cuberoot / gist:1196125
Created September 5, 2011 23:05 — forked from gruber/gist:1063605
Simple Inbox Archiving Script for Apple Mail
set _description to "All unflagged, read messages in each IMAP account inbox will be moved to the “Archive” mailbox corresponding to that account. All POP inboxes will be moved to a mailbox on this Mac called 'Archive (<Account Name>)'. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons ¬
{"Cancel", "Archive"} cancel button 1 message _description
repeat with _acct in pop accounts
if (enabled of _acct) then
set _acct_name to name of _acct