Re: Mail Search surrogate
Re: Mail Search surrogate
- Subject: Re: Mail Search surrogate
- From: Luther Fuller <email@hidden>
- Date: Thu, 09 Apr 2009 13:01:39 -0500
On Apr 9, 2009, at 12:42 AM, Gil Dawson wrote:
Unhappy with the limitations of the Search feature in mail, I
thought I'd try my hand at an AppleScript. For my first example,
I'm looking for an exhaustive list of all messages which were either
sent or received between BeginTime and EndTime... etc.
You know, the stuff Eudora was good at. :-(
A few questions:
1) Has anybody done this already?
2) How would you cycle through all messages?
2a) Using Smile, the following program...
It's easy to identify the date of a message with something like ...
date sent of msg
if (BeginTime < the result) and (the result < EndTime) then
-- add msg to list of messages
...
end if
Now, you have to scan thru all messages in Mail. I've used something
that begins like this ...
on scanMailboxes()
tell application "Mail"
set messageList to {}
set allMailboxes to mailboxes as list -- does not need open message
viewer
repeat with mbox in allMailboxes
-- your stuff here
And now for the bad news. I've discovered that 'date sent' and 'date
received' don't mean what most of us think it means. This confused me
for awhile. In Mail ...
date sent --- This is when the author of the message CREATED the
message. If a message is created on 1 Jan 2008, then left in the
drafts mailbox and not sent until 8 April 2009, then the date sent is
1 Jan 2008.
(This is something Apple can and should change.)
date received --- This is when the message arrived at the sender's
ISP. Usually only a few seconds or minutes after the date sent. It has
nothing to do with when the message arrived in your computer. (This
should also be changed. It should probably be the date/time when the
message became available to the recipient, but that may be hard to do.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden