Changing the extension to .eml works... sort of. The problem is that
the emails are all stripped of any metadata -- i.e., who sent it, a
subject line, etc. Since I've got so many of these, I'm hoping against
hope that there's a better way for me to retreive my old emails from
the system. (Please, please, please let there be a better way for me to
retreive my old emails in the system!)
This script will recover a plain text version of the emails. Copy the script
into a new 'Script Editor' window and hit the run button (and wait a long
time, if you have a lot of mail!)
Note that the script requires the use of the scripting addition "Property
List Tools" (freeware from from LateNight Software) at
<
http://www.latenightsw.com/freeware/PListTools/index.html>. Just put that
OSAX into your /Library/ScriptingAdditions folder before you start up Script
Editor.
If this works OK, I¹ll look at doing a similar one for contacts...
========== Start Script ===========
-- Recover Emails from Spotlight Cache v1.0
-- a script for Microsoft Entourage (c) by Barry Wainwright
-- this script requires the installation of the scripting addition
"Property List Tools"
-- (freeware from from LateNight Software) at
--
http://www.latenightsw.com/freeware/PListTools/index.html
--This script will recover the body of emails that have been lost from
--entourage, but whose metadata is still in the Spotlight Cache.
--The script will take a _long_ time to run!
--Although it cannot recover the folder structure of the original data,
--it can identify the original folder names. Therefore, it will recover
--emails into folders whose name will be compiled from a combination of
--the original name and Entourage's folder ID (to account for any duplicate
--folder names in the original data)
-- Note that attachments and HTML are not saved in the metadata and so
cannot be recovered.
global recoveryFolder
tell application "Microsoft Entourage"
try
set recoveryFolder to folder "Recovered Emails"
on error errMsg number errNum
set recoveryFolder to (make new folder with properties
{name:"Recovered Emails"})
end try
set identityName to name of current identity
end tell
set cacheFolder to ((get path to home folder) as text) &
"Library:Caches:Metadata:Microsoft:Entourage:2004:" & identityName &
":Messages:"
tell application "Finder" to my processFolder(folder cacheFolder)
on processFolder(thisFolder)
tell application "Finder"
repeat with aFile in (get every file of thisFolder)
my recoverFile(aFile)
end repeat
repeat with newFolder in (get every folder of thisFolder)
my processFolder(newFolder)
end repeat
end tell
end processFolder
on recoverFile(theItemFile)
global recoveryFolder
set theItemData to read property list (theItemFile as alias)
tell application "Microsoft Entourage"
set folderName to ((|kMDItemCoverage| of theItemData) & " " &
(|com_microsoft_entourage_folderID| of theItemData)) as text
try
set targetFolder to folder folderName of recoveryFolder
on error errMsg number errNum
set targetFolder to (make new folder at recoveryFolder with
properties {name:folderName})
end try
set recipList to {}
repeat with aRecip from 1 to count |kMDItemRecipientEmailAddresses|
of theItemData
copy (item aRecip of |kMDItemRecipients| of theItemData & " <" &
item aRecip of |kMDItemRecipientEmailAddresses| of theItemData & ">") to end
of recipList
end repeat
make new incoming message at targetFolder with properties {time
sent:|com_microsoft_entourage_messageSent| of theItemData, sender:{display
name:item 1 of |kMDItemAuthors| of theItemData, address:item 1 of
|kMDItemAuthorEmailAddresses| of theItemData}, content:|kMDItemTextContent|
of theItemData, subject:|kMDItemTitle| of theItemData, recipient:recipList}
end tell
end recoverFile
========== End Script ===========