Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Announce incoming Mail message senders' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Announce incoming Mail message senders
Authored by: peterkr on Tue, Jan 29 2008 at 8:59AM PST
Hi, I am using similar script for a long time. It reads RULE name instead of sender name (more practical for me):

using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with eachMessage in theMessages
try
-- If this is not being executed as a rule action,
-- getting the name of theRule variable will fail.
set theRuleName to name of theRule
set theText to "Mail from '" & theRuleName
say theText with Alex
end try
end repeat
end tell
end perform mail action with messages
end using terms from


[ Reply to This | # ]