Created
December 16, 2013 17:32
-
-
Save scottslowe/7990921 to your computer and use it in GitHub Desktop.
This AppleScript can be used to help quickly file spam messages into a spam training folder
This file contains hidden or 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
-- This script moves messages to a spam training folder | |
-- Set some default values to be used later in the script; not all values may be used | |
property destMailbox : "Spam Training" | |
property destAccount : "example.com" | |
-- Handler called when running script from script menu | |
on run | |
tell application "Mail" | |
set theSelectedMessages to selection | |
if ((count of theSelectedMessages) < 1) then | |
beep | |
return | |
end if | |
repeat with theMessage in theSelectedMessages | |
if (read status of theMessage) is false then | |
set read status of theMessage to true | |
end if | |
move theMessage to mailbox destMailbox of account destAccount | |
end repeat | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment