Re: Get .emlx file for Mail message?
Re: Get .emlx file for Mail message?
- Subject: Re: Get .emlx file for Mail message?
- From: kai <email@hidden>
- Date: Sun, 24 Sep 2006 01:33:35 +0100
On 23 Sep 2006, at 15:27, 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'd try something like this, Michael:
----------------
on file_location for m
tell application "Mail" to tell m's mailbox
set n to name
set p to ".mbox/Messages/"
tell its account to if exists then
if account type is not pop then set p to ".imapmbox/Messages/"
return account directory & "/" & n & p & m's id & ".emlx" as POSIX
file
end if
set p to n & p
set c to its container
repeat while c exists
set p to c's name & "/" & p
set c to c's container
end repeat
end tell
POSIX path of (path to library folder from user domain) & ¬
"Mail/Mailboxes/" & p & m's id & ".emlx" as POSIX file
end file_location
tell application "Mail" to set msg_ref to (get selection)'s item 1
tell application "Finder" to set msg_URL to URL of my (file_location
for msg_ref)
(* do something with msg_URL *)
----------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden