/ Published in: AppleScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
tell application "GrowlHelperApp" set the allNotificationsList to {"Mail", "Junk Mail"} set the enabledNotificationsList to {"Mail", "Junk Mail"} register as application "Growl Mail Rule" all notifications allNotificationsList ¬ default notifications enabledNotificationsList ¬ icon of application "Script Editor" end tell using terms from application "Mail" on perform mail action with messages messageList repeat with thisMessage in messageList set theSender to sender of thisMessage set theSubject to subject of thisMessage if junk mail status of thisMessage is true then set noteType to "Junk Mail" else set noteType to "Mail" end if tell application "GrowlHelperApp" to notify with name noteType ¬ title noteType description ¬ "From: " & theSender & return & return & "Subject: " & theSubject ¬ application name "Growl Mail Rule" end repeat end perform mail action with messages end using terms from