Re: How to select a message in Apple mail, given mail ID?
Re: How to select a message in Apple mail, given mail ID?
- Subject: Re: How to select a message in Apple mail, given mail ID?
- From: Shuba and Karthik <email@hidden>
- Date: Mon, 26 Sep 2011 11:07:10 -0700
So if I get the unique message id from the header in Apple's mail.app, how do I select the specific message in Apple mail to act upon?
On Mon, Sep 26, 2011 at 11:00 AM, Doug McNutt
<email@hidden> wrote:
At 10:36 -0700 9/26/11, Shuba and Karthik wrote:
>Jim,
>
>The message ID I am referring to is extracted like this:
>tell account "My account (Via Gmail)"
>tell mailbox "work"
>--count messages
>set theMsgs to every message
>count theMsgs
>set msgnr to 1
>repeat with theMsg in theMsgs...
>...set theSub to subject of theMsg
>set theDate to date received of theMsg
>set theSender to sender of theMsg
>set IsFlagged to flagged status of theMsg
>set IsRead to read status of theMsg
>set theID to id of theMsg....
>
>Does this help clarify?
Just a warning, I hope. There is a defined "Message-id:" in every email message. It's assigned by the first mail transfer agent that finds a message without one. The ID is more or less random but guaranteed to be unique.
The header in your posting looks like this:
Message-id: <CABp1hQ-0WPahSAUTZWw2tNKmOy-1F=email@hidden>
And yes. Apple's mail.app probably uses its own scheme. Compatibility is not its strong suit.
But your commands read as though they are getting header information, Date, Sender, and the like. Perhaps Message-id would work the same way.
--
--> A fair tax is one that you pay but I don't <--
_______________________________________________
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