On 27/07/2011, at 4:05 PM, Christopher Stone wrote: On Jul 26, 2011, at 20:11, Brian Christmas wrote: There's most of the information in messages available from the properties. And the terminology now appears to be 'all headers'
______________________________________________________________________
Hey Brian,
Yes. I know how to get properties from a message.
This fails:
tell application "Mail" set m to item 1 of (get selection) tell m all headers whose name is "Received" end tell end tell
--
set bar to (get properties of foo) -- or using the name of the header
You're saying you tested the bolded item and got it to work? If so please show me.
-- Best Regards, Chris
G'day Chris
Sorry about that, i inadvertently left a comment in.
If you're after a list of received mail, perhaps with unread mail, perhaps something like the following will do it. But I still don't understand what info you're after or what you do with it.
Mail has undergone dramatic changes. I've lodged several bugs.
1. Mail no longer offers an Applescript method of saving attachments, without diving into the now complex folders that attachments are held in.
2. Try creating a message with a folder in the contents, containing anything. Now save as an RTFD, open the RTFD and try to open the folder, or save the RTFD.
tell application "Mail" set foo to (get the selection) --set bar to (get properties of foo) --set temp to {deleted status, all headers, was replied to, flag index, date received, message id, background color, subject, read status, flagged status, message size, date sent, junk mail status, source, sender, was forwarded, was redirected, content} of foo -- -any property or properties set Theheaders to {} -- no one liners will do this dammit repeat with Foos in foo if (date received of Foos ≠ "" and read status of Foos = false) then set end of Theheaders to (all headers of Foos) end repeat
end tell Theheaders
|