Skip to content

Instantly share code, notes, and snippets.

@phil-monroe
Created July 13, 2015 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-monroe/315a1f2509fe13d8a133 to your computer and use it in GitHub Desktop.
Save phil-monroe/315a1f2509fe13d8a133 to your computer and use it in GitHub Desktop.
AppleScript to move calendar invites to a folder for OS X Mail
using terms from application "Mail"
on perform mail action with messages theSelectedMessages for rule theRule
repeat with theMessageNum from 1 to count theSelectedMessages
set theMessage to theSelectedMessages's item theMessageNum
if theMessage's source contains "Content-Type: text/calendar" then
set mailbox of theMessage to mailbox "Calendar Invites" of account "my_account"
end if
end repeat
end perform mail action with messages
end using terms from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment