Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get .emlx file for Mail message?



On 2006-09-23, at 07:27:47, Michael Grant wrote:

Is there any way, in AppleScript or otherwise, to quickly identify the .emlx file corresponding to a given message in Mail?

What I'm trying to do is create text "bookmarks" to specific messages in the form of file:// URIs, which I would then be able to place in any app that processes text. I'm open to another approach, if anyone has any ideas, but the point is to be able to place pointers to a specific message anywhere I want them.

If you're thinking of using "mdfind" route remember to use the "- onlyin" option. But if you want to work out the details of accounts and mailboxes fully, the following takes less than 1 second OMM:


tell application "Mail"
set sel to item 1 of (get selection)
set e_id to id of sel
set bpath to name of container of mailbox of sel & ":" & name of mailbox of sel & ".mbox"
set epath to "file://" & POSIX path of (((path to library folder from user domain) as string) & "Mail:Mailboxes:" & bpath & ":Messages:" & e_id & ".emlx")
end tell




Philip Aker
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Get .emlx file for Mail message? (From: "Michael Grant" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.