• 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: applescripting sub mailboxes in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescripting sub mailboxes in Mail


  • Subject: Re: applescripting sub mailboxes in Mail
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 11 Nov 2015 19:10:03 +1100

G’day all

I posted on the Apple developer forums, and got an answer to my dilemma.

The make new mailbox needs to be terminated with a slash. Also, creating nested folders individually is not necessary. As well, teasing  for the existence of folders need not be done

tell application "Mail"
activate
#
# 'Year 2015' is pre-existing Yosemite mailbox
#
try
make new mailbox with properties {name:("Year 2015/11/2015 11 11/") as rich text}
on error errmsg
display dialog errmsg
end try
#
# 'Year 2016' is new El Capitan mailbox
#
try
make new mailbox with properties {name:("Year 2016/11/2016 11 11/") as rich text}
on error errmsg
display dialog errmsg
end try
end tell


Regards

Santa

 _______________________________________________
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: applescripting sub mailboxes in Mail
      • From: Brian Christmas <email@hidden>
    • Re: applescripting sub mailboxes in Mail
      • From: Christopher Stone <email@hidden>
    • Re: applescripting sub mailboxes in Mail
      • From: Christopher Stone <email@hidden>
References: 
 >Fwd: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Christopher Stone <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Christopher Stone <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Sending key combinations
  • Next by Date: Re: applescripting sub mailboxes in Mail
  • Previous by thread: Re: applescripting sub mailboxes in Mail
  • Next by thread: Re: applescripting sub mailboxes in Mail
  • Index(es):
    • Date
    • Thread