I've used this hint to push my email into Mail.app automatically. But I wanted to take it even further, and have Mail activate (make itself the active application) when a new message arrived. Here's how I did that. First I used Terminal to create a compile a simple AppleScript, and named it .push (so it's hidden in the Finder). Copy and paste this line into Terminal, and the file will be created in your user's home directory:
Next, in Mail, create a new rule set to run on "any" of the following conditions. For the condition, set the pop-up to Every Message. In the actions section, set the first pop-up to Run AppleScript, and for the name of the AppleScript (assuming you used the above command in Terminal), enter ~/.push. Now hide Mail, login to some web-based mail service, and send yourself an email. If you've followed the linked hint, your server should immediately push this new messag into your Mail.app. When that happens, the rule you created will run, and that should cause Mail.app to come to the foreground.Comments (0)
Mac OS X Hints
http://hints.macworld.com/article.php?story=200903300546362