time stamp change?

M

mkc27

I have a handful of emails with crazy time stamps -- sent in 2056 or
1898 -- probably the senders' settings on their computer. It really
doesn't help in terms of putting things in chronological order -- is
there any way to actually change time stamps?
Thanks everyone (I got great help on my last post -- thank you).
 
B

Barry Wainwright

I have a handful of emails with crazy time stamps -- sent in 2056 or
1898 -- probably the senders' settings on their computer. It really
doesn't help in terms of putting things in chronological order -- is
there any way to actually change time stamps?
Thanks everyone (I got great help on my last post -- thank you).

-- Correct the date v1.0 25th June 2002
-- a script for Microsoft Entourage by Barry Wainwright
-- Resets the date of messages to the date of the first received header
-- useful for messages with badly formatted (or just plain wrong) dates

tell application "Microsoft Entourage"
set theMessages to current messages
if theMessages is {} then
display dialog "No messages selected!" buttons {"Stop"} default
button 1 with icon stop
return -99
end if

repeat with theMess in theMessages
set theHeaders to the headers of theMess
set AppleScript's text item delimiters to {return & space}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set AppleScript's text item delimiters to {return & tab}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set theHeaders to the paragraphs of theHeaders
set receivedHeader to ""
repeat with aHeader in theHeaders
if aHeader starts with "Received:" then copy contents of aHeader
to receivedHeader
end repeat
set AppleScript's text item delimiters to {";"}
set theDate to (last text item of receivedHeader)
set time sent of theMess to date theDate
end repeat
end tell
 
Top