• 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: LuKreme <email@hidden>
  • Date: Fri, 31 Dec 2010 16:26:14 -0700

On 31-Dec-2010, at 14:34, Luther Fuller wrote:
>
> tell application "Mail"
> 	activate
> 	set allMailboxes to mailboxes as list -- does not need open message viewer
> 	-- set allMailboxes to mailboxes of account something as list -- using an account is optional
> 	repeat with mbox in allMailboxes
> 		set mailboxPath to (name of mbox) as text
> 		set mboxContainer to (container of mbox)
> 		repeat
> 			try
> 				set mailboxPath to ((name of mboxContainer) as text) & "/" & mailboxPath
> 				set mboxContainer to container of mboxContainer
> 			on error
> 				exit repeat
> 			end try
> 		end repeat
> 		display dialog mailboxPath -- White mailboxes do not appear, but they do appear as a container
> 	end repeat
> end tell

that returns:

	get every mailbox
		--> {mailbox "Junk (Kreme)", mailbox "Sent Messages (List)", mailbox "ToDos", mailbox "Notes", mailbox "Outbox", mailbox "Junk (Work)"}

There are many many many more mailboxes than that.

$ ls -1 ~/Library/Mail/IMAP-kreme\@kreme.com/INBOX/ | wc -l
      56

And it only returns those few mailboxes spread over at least three account (Kreme, List, Work), ignoring the other 6.

--
If the #2 pencil is the most popular, why is it still #2?

 _______________________________________________
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: 
 >Accessing/creating mailboxes in Mail.app (From: LuKreme <email@hidden>)
 >Re: Accessing/creating mailboxes in Mail.app (From: Luther Fuller <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