Announce new Mail messages with AppleScript

Jan 20, '04 10:39:00AM

Contributed by: wesleyhall

In Apple's Mail.app, you can have it announce that you have received email from someone. Create an AppleScript in the AppleScript Editor. I call it "Announce Steve Mail" in this example. Use the following template:


tell application "Finder"
  say "You have new mail from Steve."
end tell
Save the AppleScript as a compiled Script in your "Mail Scripts" folder as "Announce Steve Mail." The location is ~Library -> Scripts -> Mail Scripts, where "~" is your user ID.

Then in Mail, select the Mail Preferences. Select the Rules icon. Create a new rule where the From selection is the email address you want to announce. Then in the actions area, select the Run AppleScript entry. The Choose... button then lets you select the newly created AppleScript "Announce Steve Mail." Then whenever a message is received from the email address you've used, Mail will announce the arrival.

[robg adds: A previous hint explains how to create customized voices for mail announcements...]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040106153235441