Hi,
How can I find the special folders like "Sent", "Deleted" listed with ListMailboxes?
I know that I can get the name, but I'm working with different languages and servers and need to copy a sent mail to the "Sent" Folder and to move a deleted mail to the "Deleted Items" folder.
There's nothing in the IMAP protocol that gives special meaning (from the protocol perspective) to these folders. They are just folders named like any other folder. If the "Sent" folder has a different name because it is in Spanish, French, German, etc., then the only solution is for your application to use the folder names customarily used in those languages. (Hopefully my reply make sense....)
Ok, thanks for letting me know.
Not sure whether this would help, but I'm looking into this direction to map folders. Guys from k-9 android mail client calling the command XLIST, but I guess this one does not work in all cases. Here is the example of calling ListMailboxes and XLIST as a raw command:
ListMailboxes:
name: INBOX
name: Personal
name: Receipts
name: Travel
name: Work
name: [Gmail]
name: [Gmail]/All Mail
name: [Gmail]/Drafts
name: [Gmail]/Important
name: [Gmail]/Sent Mail
name: [Gmail]/Spam
name: [Gmail]/Starred
name: [Gmail]/Trash
raw command:
[* XLIST (\HasNoChildren \Inbox) "/" "Inbox"
* XLIST (\HasNoChildren) "/" "Personal"
* XLIST (\HasNoChildren) "/" "Receipts"
* XLIST (\HasNoChildren) "/" "Travel"
* XLIST (\HasNoChildren) "/" "Work"
* XLIST (\Noselect \HasChildren) "/" "[Gmail]"
* XLIST (\HasChildren \HasNoChildren \AllMail) "/" "[Gmail]/All Mail"
* XLIST (\HasChildren \HasNoChildren \Drafts) "/" "[Gmail]/Drafts"
* XLIST (\HasChildren \HasNoChildren \Important) "/" "[Gmail]/Important"
* XLIST (\HasChildren \HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"
* XLIST (\HasNoChildren \Spam) "/" "[Gmail]/Spam"
* XLIST (\HasChildren \HasNoChildren \Starred) "/" "[Gmail]/Starred"
* XLIST (\HasChildren \HasNoChildren \Trash) "/" "[Gmail]/Trash"
aaad OK Success
]
As you can see, there are kind of attributes for each record, e.g.: "Sent", this is what k-9 uses for mapping. Not sure how reliable it is, but it looks as an option to me.
P.S.: Do not know how these attributes are returned for different languages.