• 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: Christopher Stone <email@hidden>
  • Date: Wed, 27 Jul 2011 05:20:03 -0500

On Jul 27, 2011, at 04:12, Brian Christmas wrote:
But I still don't understand what info you're after or what you do with it.
______________________________________________________________________

Hey Brian,

A very simple example of something I used to do regularly:

set messageSentDate to item 1 of (get content of headers whose name is "Date")
tell me to set unixDate to choose from list {messageSentDate} ¬
with prompt "Message Sent:"

In this particular instance I want the Unix Date, and that was an easy way to get it.

The point of my post was not to ask how to do it now.  I can easily parse the header text, but I shouldn't have to.

Thanks though for the 'all headers' nomenclature.  I had missed that, and it will save me a bit of overhead to parse it instead of source.

tell application "Mail"
set msg1 to first item of (get selection)
tell msg1
set h to (get all headers)
set AppleScript's text item delimiters to {"date: "}
set unixDate to paragraph 1 of text item 2 of h
end tell
end tell

Mail has undergone dramatic changes. I've lodged several bugs.

Yes.  I shall be joining you in filing bugs...

--
Best Regards,
Chris

 _______________________________________________
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

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>)
 >Re: Lion's Mail & Headers (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Lion's Mail & Headers
  • Next by Date: Re: Note on ASE scripting
  • Previous by thread: Re: Lion's Mail & Headers
  • Next by thread: How to write Good Code
  • Index(es):
    • Date
    • Thread