Skip to content

Instantly share code, notes, and snippets.

View seb3point0's full-sized avatar

Sebastien Couture seb3point0

View GitHub Profile
@seb3point0
seb3point0 / archive-mail.applescript
Last active December 14, 2015 05:49
AppleScript to archives messages in yearly mailboxes (ex: 2013 Archive).
property archive_mailbox_label : "Archive"
tell application "Mail"
set theMessages to the selection
repeat with m in theMessages
set mb to mailbox of m
set acc to account of mb
set archive_mailbox to get (the (year of (current date)) as string) & " " & archive_mailbox_label