Apple Mail rules using AppleScript

14 views
Skip to first unread message

Matt Martel

unread,
Jan 30, 2012, 2:16:17 PM1/30/12
to cocoa-unbound
Hi All,

Does anyone have a working example of a Mail rule which actually runs
a script? Even the default mail template script from Apple does not
run for me (OS X 10.7.2). The rule works, but won't run the script,
either on incoming messages or when applied to selected messages.

Thanks,

-Matt

Matt Martel

unread,
Jan 30, 2012, 3:53:00 PM1/30/12
to cocoa-unbound
OK, answering my own post. Found the problem.

The box to choose a script lets you browse to any location, but will
shorten the path to something like ~/Library/Mail Scripts/script.scpt
even if you type it in manually like /Users/mmartel/Library/Mail
Scripts/script.scpt. This is obviously a limitation in Mail that it
can't find the script and just silently fails to run it. Will file a
radar.

The new preferred location for Mail scripts (not documented, akaik)
is /Library/Scripts/Mail Scripts but users don't have permission to
save to that location. Try putting your script in another location,
and it should work (i.e. /Users/Shared).

Thanks,

-Matt
Reply all
Reply to author
Forward
0 new messages