on perform_mail_action(info) tell application "Mail" if frontmost then return -- don't announce if Mail is frontmost set selectedMessages to |SelectedMessages| of info repeat with theMessage in selectedMessages set theSender to extract name from the sender of theMessage set theSubject to subject of theMessage say "New message from '" & theSender & "'" say "Subject: " & theSubject end repeat end tell end perform_mail_action