In the following example, the imap_create_ex function creates multiple mailboxes.
imap_create_ex(&imap1,"CreateMailbox", "Mailbox=MyMailbox", LAST );
imap_create_ex(&imap1,"CreateMailboxes", "Mailbox=Products", "Mailbox=Solutions", "Mailbox=FAQs", LAST );