• 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: Accessing/creating mailboxes in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing/creating mailboxes in Mail.app


  • Subject: Re: Accessing/creating mailboxes in Mail.app
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 01 Jan 2011 09:11:19 -0600

Some more info. This script will select a mailbox ...

tell application "Mail"
activate
set selected mailboxes of message viewer 1 to {mailbox "MailboxName/sub_MailboxName/sub_sub_MailboxName"}
end tell

which suggests that a slash delimited name is the way to go.

This script ...

tell application "Mail"
activate
set theMailbox to mailbox "MailboxName/sub_MailboxName/sub_sub_MailboxName"
count messages of theMailbox
end tell

works correctly, but the mailbox I was testing with was OnMyMac.

For mailboxes belonging to an account, you should try ...

mailbox "..." of account "accountName"

or something similar.

 _______________________________________________
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: Accessing/creating mailboxes in Mail.app
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Accessing/creating mailboxes in Mail.app
  • Next by Date: Re: Accessing/creating mailboxes in Mail.app
  • Previous by thread: Re: Accessing/creating mailboxes in Mail.app
  • Next by thread: Re: Accessing/creating mailboxes in Mail.app
  • Index(es):
    • Date
    • Thread