The following script works for all types of accounts (IMAP, POP, Exchange 2007, Exchange IMAP) in Mail app without any errors
tell account "accountName" to make new mailbox with properties {name:"Mailbox1"}
However, for Exchange 2007 account, the mailbox is not syncronized with the exchange server, so the messages moved there (and the mailbox itself!) do not appear in other email clients - basically exchange server did not see that mailbox. (by the way, messages moved to that folder from the application UI, are visible, while messages moved using script, are not visible - only message counter is increased)
if I create it from menu, Mailbox->New Mailbox, Mail application itself, has no issues with the mailbox, but mailbox, created using script is not syncronized properly.
Is there a way to make this work (maybe, specifying extra property) or any other way?
except maybe ui automation is not an option for me.