Re: Mail in_reply_to field is Null in Envelope Index
Re: Mail in_reply_to field is Null in Envelope Index
- Subject: Re: Mail in_reply_to field is Null in Envelope Index
- From: Axel Luttgens <email@hidden>
- Date: Tue, 29 Oct 2013 11:25:10 +0100
Le 29 oct. 2013 à 01:39, John a écrit :
> I am trying to pull some data from the sqlite database Mail uses. However,
> the in_reply_to field of the messages table is NULL for every value when it
> should return the message id of the original message which was replied to.
Hello John,
Indeed, column "in_reply_to" comes with NULL values here too.
Now, perhaps are you relying upon (at least) three strong asumptions?
1. "If some column exists, it must be of some use".
But a given column may just be a leftover from previous versions, or anticipated for some future use, or used for handling some special cases only.
2. "A column's name must reflect its contents".
This is often the case, but... who knows?
Without a full description of an application's spec, one never may tell for sure.
3. "One may rely on an implementation detail".
Here, that detail is the existence of a given column in an sqlite database at a precise location.
By contrast, the ability to access a property through AppleScript is very less likely to be volatile.
> set databasePath to POSIX path of (path to library folder from user
> domain as text) & "Mail/V2/MailData/Envelope Index"
> set theReply to (do shell script "sqlite3 " & quoted form of
> databasePath & " \"SELECT DISTINCT in_reply_to from messages;\"")
>
> However, I can extract the value of the header with something like this:
>
> tell application "Mail"
> set aMessage to first item of (get selection)
> try
> set inReplyTo to extract address from (content of
> aMessage's header "in-reply-to")
> on error
> set inReplyTo to "NULL"
> end try
> end tell
>
> Where can I find the value of in_reply_to field within the Envelope
> Indexdatabase?
Perhaps isn't that value stored at all in some database?
I haven't thoroughly checked, but this could well be the case.
Sorry for not being able to come with better news,
Axel
_______________________________________________
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