FacebookLinked InFlickrRSS
Get Mail.app UUIDs


"Get Mail.app UUIDs" is a simple combination Apple and Shell script I wrote up to provide folks an easy way to find the UUIDs Apple's Mail.app provides.

But why?

Many folks have been using Mail.app since before the ages of the (OS X 10.6) Snow Leopard, and with Mail.app, a number of us have been using plug-ins to enhance our mail.app experience. When Apple released Snow Leopard, they also released a brand new version of Mail.app! But this one now requires all plugins to say exactly which versions they're compatible with. That means every time Apple releases an update for mail.app, a new version hash is created. This version hash is called a "UUID."

How does it work?

The Applescript does nothing more then call a shell script inside it.
set appname to "Get Mail.app UUIDs.app"
tell application "Finder" to set myFolder to (container of (path to me)) as string
set myFolderPOSIX to POSIX path of myFolder

set result to do shell script "'" & myFolderPOSIX & appname & "/Contents/Resources/getMailUUIDs'"
do shell script "echo " & result & "> '" & myFolderPOSIX & appname & "/Contents/Resources/result.txt'"
tell application "Finder"
        open myFolder & appname & ":Contents:Resources:result.txt"
end tell
The shell script does some fancy command line trickery to filter the UUID out of the places in which it exists:
cat /Applications/Internet/Mail.app/Contents/Info.plist |grep UUID -A 1 | awk "/<string>(.*)<\/string>/" | sed "s/.*<string>\(.*\)<\/string>.*/\1/" 
cat /System/Library/Frameworks/Message.framework/Resources/Info.plist | grep UUID -A 1| awk "/<string>(.*)<\/string>/" | sed "s/.*<string>\(.*\)<\/string>.*/\1/"
The result? A TextEdit window pops open with the two UUIDs you need to make your plugin work again!
Screen shot

Where do I get it?

Right here (or just click the icon at the top right of the page).

It didn't work for me! Where should I go for support?

Please leave a comment here and I will do my best to help you.
(Kudos and Thank yous are welcome, too!)
No Comments Written by Soleil Golden at 12:48 pm

Add Your Thoughts