• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Lion's Mail & Headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lion's Mail & Headers


  • Subject: Re: Lion's Mail & Headers
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 27 Jul 2011 19:12:50 +1000


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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Lion's Mail & Headers
      • From: Christopher Stone <email@hidden>
References: 
 >Lion's Mail & Headers (From: Christopher Stone <email@hidden>)
 >Re: Lion's Mail & Headers (From: Brian Christmas <email@hidden>)
 >Re: Lion's Mail & Headers (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Lion's Mail & Headers
  • Next by Date: Re: Lion's Mail & Headers
  • Previous by thread: Re: Lion's Mail & Headers
  • Next by thread: Re: Lion's Mail & Headers
  • Index(es):
    • Date
    • Thread