Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This AppleScript, designed to be used with MailTags and, assigns one or more keywords to the selected messages.
-- This script assigns MailTags keywords to the selected messages
-- Set some default values to be used later in the script
property assignedKeywords : {"Personal"}
-- Handler called when running script from script menu
on run
tell application "Mail"
set theSelectedMessages to selection
if ((count of theSelectedMessages) < 1) then
end if
using terms from application "MailTagsHelper"
repeat with theMessage in theSelectedMessages
set keywords of theMessage to assignedKeywords
end repeat
end using terms from
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.