PMC (PowerMail Check)

Versione italiana

PMC (PowerMail Check) is a small utility that installs itself in the System Status Bar (the rightmost part of the menu bar). Through an easily accessible menu, it gives up-to-date information about how many unread e-mail messages you have in your e-mail client application.

Supported e-mail clients

Currently PMC supports PowerMail and AppleMail. See the developer documentation for how to support other e-mail clients.

The menu

PMC menu is identified by this icon:

Click on it, and a menu appears, looking more or less like this one (details depend on what folders are configured in your e-mail client application):

The first group of items is the list of folders that are configured in your e-mail client application to organize your e-mails; beside each folder name, a number indicates how many unread messages are stored in that folder. You can specify what folders to list in the menu through the preferences window. Selecting one of these folders causes its number of unread messages to be displayed beside the menu icon, so that you can constantly monitor what's new in that folder with just a glance, without needing to reach the menu and pull it down to look at its contents. You can also display beside the menu icon the total number of unread messages for all the listed folders or just nothing, simply by selecting the proper menu command.
The last group of commands gives you control over the application: about box, preferences window, this help, and quitting PMC.

Setting up preferences

Here's how the preferences window looks like:

The table reports all the folders that are configured in your e-mail client application. Note that no hierarchy is kept, so all the folders are "on the same level". Actually, this is a limit of the current implementation of PMC. Only folders that have a checkmark beside their name are listed in the application menu (double-click on the cell to add or remove the checkmark); however, if you exclude a folder from being listed in the menu, all its subfolders (in the e-mail client application) will also be skipped, even if they are marked as checked in the table. You can update the folders list with the proper button below the table.
The rest of the preferences window lets you choose how often you want PMC to update the number of unread messages (this is a rather processor-intensive task, so don't set this time too short), what e-mail client application you are using among those that are supported, and if you want PMC to automatically look for newer versions.

Developer documentation

PMC can be used with any e-mail client application that supports a certain set of AppleScript commands; if you want to add support to an e-mail client application that's not currently supported, here's the place where you can find all the information you need.
The "core" of PMC is constituted by two AppleScript scripts. You can find them in the application bundle (in the Finder, control-click or right-click on PMC's icon and choose "Show package contents"), in the folder Contents/Resources/Scripts. Here, one or more folders identify all the supported e-mail client applications. Let's take PowerMail as an example. Open the PowerMail folder and look at the three files you find there. Here's what they mean:

So what should you do to support an additional e-mail client application? Just four things:
  1. Create a new folder in the application bundle/Contents/Resources/Scripts folder, giving it a title that recalls the e-mail client application name which you are adding support to (e.g. Apple Mail).
  2. Create a new GetFoldersScript.txt plain text file, that contains a valid AppleScript code that talks to the e-mail client application you are adding support to and that returns a single string of characters with a comma-separated list of all the folders configured in the e-mail client application. The AppleScript code can be as complex (or simple) as you like, provided that its output satisfies the given requisites.
  3. Create a new GetMailsScript.txt plain text file, that contains a valid AppleScript code that talks to the e-mail client application you are adding support to and that returns a single string of characters containing a comma-separated list of folder names/unread messages. The AppleScript can be as complex (or simple) as you like, provided that its output satisfies the given requisites. The script must also support a list of folders that must be excluded through an AppleScript list that is initialized with just the single element "$$$"; don't use this code "$$$" anywhere else in the script, since PMC assumes that the one and only place where it finds it is where PMC itself must replace it with the list of folders that the user has excluded.
  4. Create a new credits.txt plain text file.

Now you can launch (if not already running) PMC and choose the new e-mail client application from the pop up button in the preferences window. If your scripts are running fine and you want to include them in the official PMC distribution, please contact me.

Credits

Code by Marco Coïsson
Credits for the scripts that give support to each e-mail client application are shown in the about box of PMC.

Download PMC

You can freely donwload PMC as a zipped archive.

License

PMC is freeware. You can use it and distribute it freely, even on the Internet or on CD-ROMs or DVDs attached to magazines. You cannot sell it or earn money from it without my written permission. You cannot distribute PMC if it has been modified, even in its resources or in its documentation.
Developing software costs time and money; you can find on my home page the details of my PayPal account in case you would like to consider donating me some money.

Thank you for using PMC!