Selective mail notification on the iPhone using Prowl and Outlook

The biggest issue for me when moving from the BlackBerry to the iPhone was the fact that selective e-mail notification feature was unavailable. The option for e-mail notification is an all or nothing option which is applied to all e-mail accounts on the iPhone. In order for the iPhone to be taken seriously in the enterprise, this is one issue that Apple will need to resolve. The other problem is that because of Apple's tight Appstore development restrictions, there isn't really a way for a 3rd party application to fill this gap unless you chose to jailbreak your phone and utilize an application like MyProfiles. I recently discovered a decent workaround that allows me to receive push notifications when I receive new e-mail messages from either individuals that I select or based on any criteria I setup within Outlook. This workaround will send a Prowl notification to your iPhone with the From and Subject information of your message. An added benefit of this is that you can turn off Exchange push (since you're getting your pushes via Prowl for the messages you care about) and do a manual check once you get something you care about, thus saving your battery. This is also a nice option to know you have new messages when you are having issues with Exchange push working properly when on your corporate wireless, thus causing your mail to not push properly (because of internal/external IP issues - a known issue).

The first step to this is to download and install Prowl ($2.99) on your iPhone. Prowl is a framework that allows you to send push notifications to your phone using Growl (for either OS X or Windows) or via API applications. I've used Prowl since it was released and used it for IRC messages and various other notification purposes, but never realized that it could be used with Outlook. After you download and install Prowl, you will need to create an account. After you create your account, login via a web-browser (not your iPhone) and go to http://prowl.weks.net and navigate to settings and obtain your API key.

Next, open Outlook (I'm using 2007). Now you will need to tweak some macro security settings by going to Tools -> Trust Center -> Macro Security and set security to Warnings for all Macros. Next, open up the Outlook Visual Basic editor by pressing Alt-F11 or by going to Tools -> Macros -> Visual Basic Editor. When you first open Outlook VBA, it will open the built in VbaProject.OTM and have a built-in class module named ThisOutlookSession. Expand the sections on the left until you see ThisOutlookSession, then double-click on this and paste these lines. Make sure you replace your Prowl API key in the code you put into the VB editor.


Save and close the Visual Basic file. Now you have to go into Outlook and write your rules that you wish to use to determine what you will be notified on. When selecting the rule action, you should have the option to run a script. When you select this action you should now have the option to select one of the 3 routines you just created - Level0Growl, Level1Growl or Level2Growl. The reason for the 3 different routines is so that you can send messages at different notification priorities, thus giving you the ability to have different types of notifications on the iPhone (since each priority has it's own controls).

The last step is to test your rules. Make sure you either include yourself in the email rules or are keying off of a subject that you can easily create. Then, send a message that will trigger your rule to yourself. You should see a Growl message, and then shortly thereafter, you should receive the message on your iPhone. If there is a problem with your VB, then the rule will fail and the VB editor will open up. You can also change things around such as Item.SenderName to Item.SenderAddress if you would prefer to see the e-mail address instead of the sender name.


Once you're sure things are working, you can create more rules and even utilize different priorities for different types of messages (On-Call, Boss, Wife, etc). You will need to make sure that Outlook is always running since these rules are client-side only. This type of selective notification can also be done without Outlook if your Enterprise isn't using Exchange. I'll touch on this in a later post. Please let me know if this works for you!
See Older Posts...