@Thomas - thank you. This is correct, should fix things.
And just to be clear - my app does not create any folders on IMAP servers (like K-9 or stock email does), it works with whatever folders are there. If it can't guess which one to use for sent messages, it just saves them locally (on the device).