Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Applescript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Applescript
Authored by: bih on Sep 23, '02 02:08:01PM

Is there a way to get the address of the sender announced when a new message is recieved? This would be really cool.



[ Reply to This | # ]
Applescript
Authored by: hayne on Sep 24, '02 03:52:22AM

As far as I can see, there is no way to get Mail.app to run an applescript when a new message is received.
Otherwise something like the following applescript might work:

tell application "Mail"
set selectedMessages to selection
repeat with theMessage in selectedMessages
set theSender to the sender of theMessage
set theSubject to subject of theMessage
say "New message from '" & theSender & "'"
say "Subject: " & theSubject
end repeat
end tell

Entourage does support running an applescript as part of a rule, so this sort of thing is easy to do in Entourage. Here's the script you can have an Entourage rule run: (You need to save it as a compiled script using Script Editor or Smile, etc.)

tell application "Entourage"
set selectedMessages to current messages
repeat with theMessage in selectedMessages
set theSender to the display name of sender of theMessage
set theSubject to subject of theMessage
say "new message from '" & theSender & "'"
say "Subject: " & theSubject
end repeat
end tell



[ Reply to This | # ]