Posted By

jodm on 12/11/09


Tagged

mail growl


Versions (?)

Mac Mail - Growl


 / Published in: AppleScript
 

  1. tell application "GrowlHelperApp"
  2. set the allNotificationsList to {"Mail", "Junk Mail"}
  3. set the enabledNotificationsList to {"Mail", "Junk Mail"}
  4. register as application "Growl Mail Rule" all notifications allNotificationsList ¬
  5. default notifications enabledNotificationsList ¬
  6. icon of application "Script Editor"
  7. end tell
  8.  
  9. using terms from application "Mail"
  10. on perform mail action with messages messageList
  11. repeat with thisMessage in messageList
  12. set theSender to sender of thisMessage
  13. set theSubject to subject of thisMessage
  14. if junk mail status of thisMessage is true then
  15. set noteType to "Junk Mail"
  16.  
  17. else
  18. set noteType to "Mail"
  19. end if
  20. tell application "GrowlHelperApp" to notify with name noteType ¬
  21. title noteType description ¬
  22. "From: " & theSender & return & return & "Subject: " & theSubject ¬
  23. application name "Growl Mail Rule"
  24. end repeat
  25. end perform mail action with messages
  26. end using terms from

Report this snippet  

You need to login to post a comment.