Hi, maybe someone already done that script or known where could I look for it, but is possible read (with text to speech function) the sender of incoming new mails in Mail ? Regards
Hi,
something like this? (define a rule for every message and attach the script
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with eachMessage in theMessages
tell application "Mail" to set theSender to extract name from sender of eachMessage
say "you got mail from " & theSender
end repeat
end perform mail action with messages
end using terms from
Please permit me to ask a stupid question:
When I save this script in Script Editor, which type of file should I choose? Script, Script Application, Script Bundle, Application Bundle, or Text?
Should I save it to a particular location?
I set up a rule in Mail.app, and attached the above script (saved as a Script to my desktop), but something’s not working. I think perhaps the rule is not firing when new mail comes in.
yes! But now where should I put that script ? In Library/Script/Mail ? I have already try in that location but is doesn’t work ? Any tips ? Best regards
It doesn’t matter where the script is located.
But you must define the rule and choose the script for the “Run AppleScript” action
I am looking for a similar script that is “user invoked”, not triggered from a mail rule. I am not that proficient with applescript so forgive me if there is an obvious answer. I looked at the mail applescript dictionary and I am guessing that my problem has to do with the “perform mail action with messages” string but I am not exactly clear on what I should be changing.
I am basically trying to put together a script that will read back to me all the senders of the unread mail in my inbox. Something that I can run if I have been away from my computer for a while.
Any suggestions? Any help is appreciated.