-- Show message info using Growl -- Portions of this are probably copyright Apple and/or someone on the Growl team -- since I cobbled this together from code that I found. on perform_mail_action(info) tell application "Mail" set theMessages to |SelectedMessages| of info repeat with thisMessage in theMessages set thisSubject to subject of thisMessage as string set AppleScript's text item delimiters to {""} set thisSender to sender of thisMessage as string set brkpos to offset of "<" in thisSender if (brkpos is greater than 1) then set thisSender to (text items 1 through (brkpos - 1)) of thisSender as string if thisSender contains "\"" then set AppleScript's text item delimiters to {"\""} set thisSender to text item 2 of thisSender as string end if else if (brkpos is equal to 1) then set thisSender to (text items 2 through -1) of thisSender as string end if set AppleScript's text item delimiters to {"@"} set thisSender to text item 1 of thisSender as string end if tell application "GrowlHelperApp" -- Make a list of all the notification types -- that this script will ever send: set the allNotificationsList to  {"Mail Notification", "Another Test Notification"} -- Make a list of the notifications -- that will be enabled by default. -- Those not enabled by default can be enabled later -- in the 'Applications' tab of the growl prefpane. set the enabledNotificationsList to  {"Mail Notification"} -- Send a Notification... notify with name  "Mail Notification" title  thisSender description  thisSubject application name "mailgrowler" notify with name  "Another Test Notification" title  "Another Test Notification :) " description  "Alas Ñ you won't see me until you enable me..." application name "mailgrowler" end tell end repeat end tell end perform_mail_action tell application "GrowlHelperApp" -- Make a list of all the notification types -- that this script will ever send: set the allNotificationsList to  {"Mail Notification", "Another Test Notification"} -- Make a list of the notifications -- that will be enabled by default. -- Those not enabled by default can be enabled later -- in the 'Applications' tab of the growl prefpane. set the enabledNotificationsList to  {"Mail Notification"} -- Register our script with growl. -- You can optionally (as here) set a default icon -- for this script's notifications. register as application  "mailgrowler" all notifications allNotificationsList  default notifications enabledNotificationsList  icon of application "Mail" end tell