Growl Notifications for Apple Mail on Mac OS X Snow Leopard (10.6)
UPDATE: You can grab a beta version of 64-bit Growl 1.2 from the Growl beta site.
GrowlMail is broken on Mac OS X Snow Leopard (10.6). The dev team for Growl has a fix in the works, but I use Prowl and like to have notifications go to my iPhone when I’m not at my computer. So in the meantime, here is my solution.

I was originally inspired by James Higgs.
You first want to create a new AppleScript using AppleScript Editor and save it somewhere logical. I used /Library/Scripts/Mail Scripts/Rule Actions/Growl.scpt Below is the code:
-- Growl Alerts in Mail
-- Hunter Ford [http://www.cupcakewithsprinkles.com]
-- This script arises from the lack of any Growl Support in Mac OS X Snow Leopard (10.6)
-- Code inspired by and adapted from James Higgs [http://blog.jameshiggs.com/2009/08/28/growlmail-on-snow-leopard-a-temporary-fix/] as well as those mentioned.
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to {"New Email"}
-- 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 {"New Email"}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application "Mail" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Mail"
end tell
-- Mail Rule Trigger
--
-- Source: Benjamin S. Waldie [http://www.mactech.com/articles/mactech/Vol.21/21.09/ScriptingMail/index.html]
using terms from application "Mail"
on perform mail action with messages theSelectedMessages for rule theRule
repeat with thisMessage in theSelectedMessages
-- Process the current message
-- Grab the subject and sender of the message
set growlSubject to subject of thisMessage
set growlSender to my ExtractName(sender of thisMessage)
-- Use the first 100 characters of a message
set growlMessage to (content of thisMessage)
set growlLength to (length of growlMessage)
if growlLength > 100 then
set growlMessage to (characters 1 through 100 of growlMessage) & "…"
end if
set growlMessage to growlSubject & "
" & growlMessage
-- Send a Notification
tell application "GrowlHelperApp"
notify with name "New Email" title growlSender description growlMessage application name "Mail"
end tell
end repeat
end perform mail action with messages
end using terms from
-- *ExtractName*
--
-- gathers the name portion from the "From: " line
--
-- Source: robJ [http://forums.macosxhints.com/archive/index.php/t-19954.html]
to ExtractName(sender_)
if sender_ begins with "<" then
return text 2 thru -2 of sender_
else
set oldTIDs to text item delimiters
try
set text item delimiters to "<"
set name_ to first text item of sender_
set text item delimiters to oldTIDs
on error
set text item delimiters to oldTIDs
end try
return name_
end if
end ExtractName
Run this first in the AppleScript Editor. As this is what will “register” the notification with Growl. Click the green “play” button that says “Run”.

Then you want to create a new rule in mail that will run this script on every message that comes in.

Make sure to select “Don’t Apply” that way you don’t flood your screen with tons of Growl notifications.

Comments
48 Responses to “Growl Notifications for Apple Mail on Mac OS X Snow Leopard (10.6)”
Leave a Reply
Thanks – works fine!
Awesome. Thanks for doing that, Hunter. I may never use GrowlMail again!
Almost perfect!
It just need to send the command to open the new message once the growl notification is clicked… would it be possible to add this to the apple script?
@Cosimo I’m afraid not. At the moment, only Cocoa and Carbon apps can track clicks on Growl alerts using the Growl Application Bridge. Applescript just ain’t that fancy.
Snow Leopard -w00t (mostly)…
So, my copy of Snow Leopard arrived today. A couple of hours later both machines are running it quite happily.
Let’s start with the bad news (there’s not much actually).
Not installing Rosetta seems like a losing prospect. There are just too man…
Thanks so much for the script. It worked wonderfully just a small glitch on my mac. It shows the details of one previous message rather than that of the new message. (I am synching with an Microsoft server 2007).
[...] Next up were a couple Apple Mail plugins that notify me when I receive new mail, Growl Mail and MailUnread Menu. I wasn’t terribly surprised to find them incompatible as Mail it known for breaking these plugin bundles whenever it updates. I was able to find a script that could communicate with Growl through use of a rule that, so I am still notified about new mail. That script can be found here [...]
Thanks so much for this! I just installed SL and found this issue with Growl and Mail and it’s now fixed with your script.
[...] es hier; Ein kleines Apple Skript welche die Mailbenachrichtigung ähnlich wie Growl Mail [...]
[...] under OS X Snow Leopard GrowlMail no longer works under Snow Leopard. Here’s a work-around: http://www.cupcakewithsprinkles.com/growl-notifications-for-apple-mail-on-mac-os-x-snow-leopard-10-6... Written by Florian Beer in: moblog | Tags: growl, growlmail, mail, osx, snowleopard Related [...]
Absolutely awesome! Thank you very much!
This rules!! Thanks for posting this. It worked perfectly.
It seems to only want to display the notification for the currently selected email and repeats the same number of times as there are new emails.
I’m having the same issue as Chris… Whenever I get an email, it’s just display the most recent selected email.
Any idea what changes to the script need to be made?
No thats what I call xmoov
Good lookin out!
Awesome! Thanks so much for this script. It works fine.
thanks this is great!
)
um wtf? the way you copy and pasted it, the line numbers show up so i get a line number in front of every line…. i have to manually remove it now, that is awful…. could you copy and paste it without the line numbers? i know it “looks cooler” but it isn’t practical.
Outstanding.
Thanks.
@T If you hover your mouse inside the code block, at the top right, you should see a number of icons. These will allow you to view the source without the line numbers. There’s also an option to copy the code to your clipboard.
I tried compiling the script and got lots of end of line errors highlighting the quotation marks around application “Mail” and so on.
The script saved fine, and I ran the registration – apparently ok, in that nothing appeared to happen – yet when I try and compile the script, I still get eo line errors, and nothing happens when mail arrives..
I copied the script on to the clipboard which I emptied in to the app script editor…any thoughts?
Does not work. Followed the steps exactly, no actions in Mail. First clue something was wrong was that I wasn’t asked if I wanted to apply this rule after I created and saved it.
Hunter – you just saved me! Growl mail is broken again with the lated patch from Apple, (1.6.2) but your script is working perfectly! Thanks for taking the time to write it and share it with perfect instructions!
works great,
thx,
marius
works like a charm! Thanks so much!
Works great, just except for the clicking issue Cosimo mentioned.
Annoying that after every OSX update Growl doesn’t work properly any more…
worked like a charm, but lmao i got 1400 mails in my mailbox after that grows was opening each one so i had to quit it hehe.
thanks
Works Fine!!! Thanks a lot
Absolutely awesome! code works perfectly and is much simpler than many other workarounds I have already tried. Thanks!
Thanks for your script! Worked like a charm!
Ever since the new Snow Leopard upgrade, and Growl Mail went bust, I have been so frustrated!
But now I found your script and things are great once again!
wow, you are awesome!!!!
it works great! thanks a lot!!!
Excelent, thanks for sharing, it works great here!
Works GREAT!!! Just ran the newest Apple update and got real upset when Growl Mail was broken again! You saved me from going nuts! Thank you so much!
[...] AppleScript está sacado de Cupcake With Sprinkles, y es para Snow Leopard. Lo que hay que hacer es abrir el Editor AppleScript que se encuentra en [...]
Thanks, thanks, thanks…
Great job!
I am seeing the same issue with the script that Chris, Nick, and Achal are seeing.
If there is nothing in my inbox, I get no growl notification. If I have stuff in the inbox, for a new mail, it’s showing the info from the previous email.
Strange.
Thanks! It’s great!
Nice work… was getting frustrated that I couldn’t see when I was getting a new email message.
Thanks for posting this!
Oh!!! Really, really, really useful!!!! Thanks a lot!!!
great work!
I was missing this when i went to SL
Works well for what i wanted!
Thank you for sharing!
Hi,
Same issue as a few others. I get the notification right but for the mail before last.
Any idea ?
Thanks this is awesome. I’m def. passing this along.
[...] -> Growl Notifications for Apple Mail on 10.6 [...]
OMG. Thanks. A. Lot.
Nice One
For those complaining about the line numbers, you can click the icon in the upper right corner to get the source.
And I have the previous e-mail problem too. Weird. I think it’s more an AppleMail issue.
Works brilliantly thanks.
[...] quick search around reveals that this may not just be me: I saw this Comment Thread and also this post on [...]