• 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: Simple apple script to open a message in Mail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple apple script to open a message in Mail?


  • Subject: Re: Simple apple script to open a message in Mail?
  • From: Nigel Garvey <email@hidden>
  • Date: Fri, 22 Feb 2013 11:16:17 +0000

In my message of Thu, 21 Feb 2013 20:17:16 +0000, I wrote:

>Bruce Herbach wrote on Wed, 20 Feb 2013 15:00:49 -0500:

>>tell application "Mail"
>>activate
>>open (first message of mailbox "Office/Inbox" where message id =
>>"CD482A1C.E5BB%email@hidden")
>>end tell
>>
>>Running this script in the Applescript editor gives the following
error
>>message:
>>error "Mail got an error: Can’t get mailbox \"Office/Inbox\"." number
>>-1728 from mailbox "Office/Inbox"
>
>The message is reporting that the mailbox doesn't exist — ie. that
>there's no mailbox called "Inbox" in another, top-level mailbox called
>"Office".
>
>Once that's sorted out, this sort of thing seems to work:
>
>  tell application "Mail"
>    activate
>    open (first message of mailbox "Office/Inbox" where all headers
>contains "Message_id: <CD482A1C.E5BB%email@hidden>")
>  end tell

Sorry. I was misled by the other replies. The error message _is_ about
the non-existence of the mailbox. as I said, but your 'message id'
format is correct. A Mail message's 'message id' is the "Message-id"
header of the message without the enclosing angle brackets. The 'id' is
the integer number given to the message by Mail itself. Or so it is with
my copy of Mail.

NG

 _______________________________________________
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: Simple apple script to open a message in Mail?
      • From: Doug McNutt <email@hidden>
References: 
 >Re: Simple apple script to open a message in Mail? (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Simple apple script to open a message in Mail?
  • Next by Date: Re: Simple apple script to open a message in Mail?
  • Previous by thread: Re: Simple apple script to open a message in Mail?
  • Next by thread: Re: Simple apple script to open a message in Mail?
  • Index(es):
    • Date
    • Thread