I am trying to build a simple email client with python and IMAPClient. The problem is that the folder names aren't uniform for all servers.
If i mark an e-mail as spam, it has to be moved to the spam/junk folder from the inbox folder (?) .. but i am unable to do that because i don't know what the folder name would be (Spam or INBOX.junk or [Gmail]/Spam )
How do other email clients work with varying folder names ?
They try a lot of possibilities, let you choose one and/or create one ;)
Identifying IMAP mail folders (spam,sent...), folder names vary with servers