Fri, Nov 09 2007

GrowlMail and Leopard not getting along?! Here's a solution

Last weekend I upgraded to Mac OS X Leopard, and one thing that doesn't seem to work with Leopard is GrowlMail* (a Growl Extra). After missing Growl Notifications for Mail.app a lot, I decided to search for a solution. After some googling, I found this on Kevin Way's blog:

"I wanted a simple system that would notify me whenever I received an e-mail from somebody "important", but not for every new message that hit my inbox."

"I tried GrowlMail and Mail.Appetizer, but found them both unsatisfactory. I finally decided that what I really wanted was a growl message to appear for messages from selected recipients. Something with the name and the subject of the e-mail, like this..."

This seemed a lot like what I needed, with the exception of the only receiving notifications when email from "important" people arrived part. So, here are my slight changes to Kevin's instructions:

If any of the conditions are met:
Every Message
Perform the following actions:
Run AppleScript: ~/AppleScripts/GrowlMailScript.scpt

Careful! When you're finished making your new rule, Mail.app asks you "Do you want to apply your rules to messages in selected mailboxes?" Be sure click the "Don't Apply" button! If you don't, you may be bombarded with a "new mail" notification for every email you've ever recieved all at one.

        on perform_mail_action(info)

            tell application "Mail" 

                set selectedMessages to |SelectedMessages| of info

                repeat with eachMessage in selectedMessages
                    set theSubject to subject of eachMessage
                    set theSender to sender of eachMessage

                    tell application "GrowlHelperApp" 

                        set the allNotificationsList to ¬
                            {"New Mail"}

                        set the enabledNotificationsList to ¬
                            {"New Mail"}

                        register as application ¬
                            "MailScript" all notifications allNotificationsList ¬
                            default notifications enabledNotificationsList ¬
                            icon of application "Mail" 

                        notify with name ¬
                            "New Mail" title ¬
                            "New Mail from " & theSender description ¬
                            theSubject application name "MailScript" 

                    end tell

                end repeat
            end tell
        end perform_mail_action

You're done! Send yourself an email to test it out.

* Tested with GrowlMail 1.1.2

posted at: 18:37 | path: /Mac | Permanent link to this entry | Add/View comments (6 existing)

 








Copyright ©2004-2007 O. Patrick Barnes. All rights reserved.  

Validate XHTML Validate CSS Validate RSS Green Web Hosting! This site hosted by DreamHost.