• 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: Getting text out of Mail headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting text out of Mail headers


  • Subject: Re: Getting text out of Mail headers
  • From: Shane Stanley via AppleScript-Users <email@hidden>
  • Date: Wed, 10 Jun 2020 10:22:47 +1000

On 10 Jun 2020, at 8:51 am, @lbutlr via AppleScript-Users
<email@hidden> wrote:
>
> Ah, the answer is "poorly" 😃
>
> Header 1 returns the first matching header, header 2 the second matching
> header. Every header returns, as one might expect, every matching header.

So behaving exactly as AppleScript is supposed to is your idea of "poorly"?

> If there is a syntax for
>
> every header whose name is "received" and contains "ESMTPS id" and whose text
> contains "by mail.myserver.tld"
>
> I haven't figured it out yet.

Perhaps you should try a little harder.

tell application id "com.apple.mail" -- Mail.app
        set theMessage to item 1 of (get selection)
        every header of theMessage whose name is "received" and content
contains "by mail.myserver.tld" and content contains "ESMTPS id"
end tell

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>

 _______________________________________________
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: Getting text out of Mail headers
      • From: "@lbutlr via AppleScript-Users" <email@hidden>
References: 
 >Re: Getting text out of Mail headers (From: Shane Stanley via AppleScript-Users <email@hidden>)
 >Re: Getting text out of Mail headers (From: LuKreme via AppleScript-Users <email@hidden>)
 >Re: Getting text out of Mail headers (From: "@lbutlr via AppleScript-Users" <email@hidden>)

  • Prev by Date: Re: Getting text out of Mail headers
  • Next by Date: Re: Getting text out of Mail headers
  • Previous by thread: Re: Getting text out of Mail headers
  • Next by thread: Re: Getting text out of Mail headers
  • Index(es):
    • Date
    • Thread