So I'm looking for better options. I can probably do this in dummy BCC recipients, but that's not nearly as elegant. Any better ideas?
Well, each mail is stored as a file on your hardrive, I think (I'm sure of it in fact) that you can add SpotLight comments using the Finder :
set comment of (file "Tiger:Users:jeanbaptiste:Library:Mail:Mailboxes:AppleScript Users.mbox:Messages:4107.emlx") to "foobar"
And now, just search for "foobar" in Spotlight.
BTW can someone explain me why the following is not working ?
set comment of (alias "Tiger:Users:jeanbaptiste:Library:Mail:Mailboxes:AppleScript Users.mbox:Messages:4107.emlx") to "foobar"
THe last thing is to be able to make a relation between the mail message and its id.
To do so, you'll have to go and investigate in the following file : alias "Tiger:Users:jeanbaptiste:Library:Mail:Envelope Index"
This file is in fact a SQL database that you can query using the 'sqlite3' command line utility :
Here is the structure of the databases (not the INDEX, only the TABLES)
CREATE TABLE messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, message_id, in_reply_to, remote_id INTEGER, sender INTEGER, subject_prefix, subject INTEGER, date_sent INTEGER, date_received INTEGER, date_last_viewed INTEGER, mailbox INTEGER, remote_mailbox INTEGER, original_mailbox INTEGER, flags INTEGER, read, flagged, size INTEGER, color, encoding, pad);
CREATE TABLE subjects (ROWID INTEGER PRIMARY KEY, subject);
I'm far from being an SQL expert but if someone want to try it.
++ JB
|