Barry
Fri Sep 08 10:20:08 CDT 2006
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3240577217_9028733
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit
On 8/9/06 05:40, in article
1157690435.349105.52590@d34g2000cwd.googlegroups.com, "danreines@gmail.com"
<danreines@gmail.com> wrote:
> 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 ===========
--
Barry Wainwright
Microsoft MVP (see
http://mvp.support.microsoft.com for details)
Check out the Entourage User's WebLog for hints, tips and troubleshooting
<
http://homepage.mac.com/barryw/weblog/weblog.html>
--B_3240577217_9028733
Content-type: text/html;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Re: Switch identities</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 8/=
9/06 05:40, in article 1157690435.349105.52590@d34g2000cwd.googlegroups.com,=
"danreines@gmail.com" <danreines@gmail.com> wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">> Changing the extension to .eml works... sort of.=
The problem is that<BR>
> the emails are all stripped of any metadata -- i.e., who sent it, a<BR=
>
> subject line, etc. Since I've got so many of these, I'm hoping against=
<BR>
> hope that there's a better way for me to retreive my old emails from<B=
R>
> the system. (Please, please, please let there be a better way for me t=
o<BR>
> retreive my old emails in the system!)<BR>
</FONT><BR>
This script will recover a plain text version of the emails. Copy the scrip=
t into a new 'Script Editor' window and hit the run button (and wait a long =
time, if you have a lot of mail!)<BR>
<BR>
Note that the script requires the use of the scripting addition "Prope=
rty List Tools" (freeware from from LateNight Software) at <a href=3D"htt=
p://www.latenightsw.com/freeware/PListTools/index.html"><
http://www.laten=
ightsw.com/freeware/PListTools/index.html></a>. Just put that OSAX into y=
our /Library/ScriptingAdditions folder before you start up Script Editor.<BR=
>
<BR>
If this works OK, I’ll look at doing a similar one for contacts...<BR=
>
<BR>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Start Script =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>
<BR>
-- Recover Emails from Spotlight Cache v1.0<BR>
-- a script for Microsoft Entourage (c) by Barry Wainwright<BR>
-- this script requires the installation of the scripting addition &q=
uot;Property List Tools" <BR>
-- (freeware from from LateNight Software) at <BR>
-- <a href=3D"
http://www.latenightsw.com/freeware/PListTools/index.html">http=
://www.latenightsw.com/freeware/PListTools/index.html</a><BR>
<BR>
--This script will recover the body of emails that have been lost from <BR>
--entourage, but whose metadata is still in the Spotlight Cache.<BR>
<BR>
--The script will take a _long_ time to run!<BR>
<BR>
--Although it cannot recover the folder structure of the original data, <BR=
>
--it can identify the original folder names. Therefore, it will recover <BR=
>
--emails into folders whose name will be compiled from a combination of <BR=
>
--the original name and Entourage's folder ID (to account for any duplicate=
<BR>
--folder names in the original data)<BR>
<BR>
-- Note that attachments and HTML are not saved in the metadata and so cann=
ot be recovered.<BR>
<BR>
global recoveryFolder<BR>
tell application "Microsoft Entourage"<BR>
try<BR>
set recoveryFolder to folde=
r "Recovered Emails"<BR>
on error errMsg number errNum<BR>
set recoveryFolder to (make=
new folder with properties {name:"Recovered Emails"})<BR>
end try<BR>
set identityName to name of current identity<BR>
end tell<BR>
<BR>
set cacheFolder to ((get path to home folder) as text) & "Library:=
Caches:Metadata:Microsoft:Entourage:2004:" & identityName & &qu=
ot;:Messages:"<BR>
tell application "Finder" to my processFolder(folder cacheFolder)=
<BR>
<BR>
on processFolder(thisFolder)<BR>
tell application "Finder"<BR>
repeat with aFile in (get e=
very file of thisFolder)<BR>
my =
recoverFile(aFile)<BR>
end repeat<BR>
repeat with newFolder in (g=
et every folder of thisFolder)<BR>
my =
processFolder(newFolder)<BR>
end repeat<BR>
end tell<BR>
end processFolder<BR>
<BR>
<BR>
on recoverFile(theItemFile)<BR>
global recoveryFolder<BR>
set theItemData to read property list (theItemFile =
as alias)<BR>
tell application "Microsoft Entourage"<BR=
>
set folderName to ((|kMDIte=
mCoverage| of theItemData) & " " & (|com_microsoft_entoura=
ge_folderID| of theItemData)) as text<BR>
try<BR>
set=
targetFolder to folder folderName of recoveryFolder<BR>
on error errMsg number errN=
um<BR>
set=
targetFolder to (make new folder at recoveryFolder with properties {name:fo=
lderName})<BR>
end try<BR>
set recipList to {}<BR>
repeat with aRecip from 1 t=
o count |kMDItemRecipientEmailAddresses| of theItemData<BR>
cop=
y (item aRecip of |kMDItemRecipients| of theItemData & " <"=
& item aRecip of |kMDItemRecipientEmailAddresses| of theItemData & =
">") to end of recipList<BR>
end repeat<BR>
make new incoming message a=
t targetFolder with properties {time sent:|com_microsoft_entourage_messageSe=
nt| of theItemData, sender:{display name:item 1 of |kMDItemAuthors| of theIt=
emData, address:item 1 of |kMDItemAuthorEmailAddresses| of theItemData}, con=
tent:|kMDItemTextContent| of theItemData, subject:|kMDItemTitle| of theItemD=
ata, recipient:recipList}<BR>
end tell<BR>
end recoverFile<BR>
<BR>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D End Script =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>
<BR>
-- <BR>
Barry Wainwright<BR>
Microsoft MVP (see <a href=3D"
http://mvp.support.microsoft.com">http://mvp.su=
pport.microsoft.com</a> for details)<BR>
Check out the Entourage User's WebLog for hints, tips and troubleshooting<B=
R>
<a href=3D"
http://homepage.mac.com/barryw/weblog/weblog.html"><http://home=
page.mac.com/barryw/weblog/weblog.html></a><BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>
--B_3240577217_9028733--