Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #APPLE-SCRIPT GROWL NOTIFICATION FOR APPLE MAIL (10.6/10.7)
- #create an filter which fires this script when new mail arrives
- #only needed one time - growl registration - put in a separate file
- tell application "Growl"
- register as application "MailNotify" all notifications {"newMailNotify"} default notifications {"newMailNotify"} icon of application "mail.app"
- end tell
- #the notification script - also to put in a separate file
- using terms from application "Mail"
- on perform mail action with messages mlist for rule Notification
- set msub to subject of item 1 of mlist
- set msnd to sender of item 1 of mlist
- set msnd to extract name from (msnd)
- tell application "Growl"
- notify with name "newMailNotify" title msub description msnd application name "MailNotify"
- end tell
- end perform mail action with messages
- end using terms from
Advertisement
Add Comment
Please, Sign In to add comment