login about faq

I have an issue with getting list of mailboxes from IBM Lotus Notes 9.0.

Lotus Notes uses "" char as separator to separate parent/child folders(mailboxes doesn't matter).

Session log: ----INFO---- Connecting to IMAP server at %IP-ADDRESS%:143 ----IMAP RESPONSE---- * OK Domino IMAP4 Server Release 9.0 ready Thu, 23 Mar 2017 21:54:35 +0400 ----IMAP REQUEST---- aaab LOGIN "%USERNAME%" ----IMAP RESPONSE---- aaab OK LOGIN completed ----IMAP REQUEST---- aaac LIST "" "*" ----IMAP RESPONSE---- * LIST (Noinferiors HasNoChildren) "\" Inbox * LIST (Noinferiors HasNoChildren) "\" Trash * LIST (HasChildren) "\" Untitled * LIST (HasNoChildren) "\" "Untitled 2" * LIST (HasChildren) "\" {18} UntitledUntit_led * LIST (HasNoChildren) "\" {29} UntitledUntit_ledUntitled55 * LIST (HasNoChildren) "\" zzz_xxx aaac OK LIST completed

LastErrorText: ChilkatLog: ListMailboxes: DllDate: Mar 20 2017 ChilkatVersion: UnlockPrefix: 7PGRPCIMAPMAILQ Architecture: Little Endian; 32-bit Language: .NET 4.5 VerboseLogging: 0 listMailboxes: bSubscribedOnly: 0 reference: mailbox: Escaping quotes and backslashes in mailbox name... utf7EncodedMailboxPath: isOK: serverResponse: aaac OK LIST completed --isOK Success. --listMailboxes Success. --ListMailboxes --ChilkatLog

Mailboxes.GetName(index) for Untitled\Untit_led mailbox returns "UntitledUntit_led" without separator char. It makes impossible to know the real name and path for folder. Furthermore it makes impossible to select such mailbox - because i don't know full name.

Setting up the SeparatorChar to "\" also didn't helped.

The question is are there any way to get correct names?

asked Mar 23 '17 at 14:41

kolobkov's gravatar image


edited Mar 23 '17 at 14:43

The imap.ListMailboxes method has the side-effect of setting the value of the imap.SeparatorChar property to the correct value for that particular mail server. To find the correct SeparatorChar, call SelectMailboxes, and then see what it is..


answered Mar 23 '17 at 21:26

chilkat's gravatar image

chilkat ♦♦

Answer didn't fit into comment length restriction so i put it as another answer.

(Mar 24 '17 at 06:35) kolobkov


There is not SelectMailboxes method in .Net IMAP component. At same time SelectMailbox doesn't set correct separator. ListMailboxes also doesn't do that.

SeparatorChar equals to period "." all the time - before/after SelectMailbox method and before/after ListMailboxes method.

Actually raw response for ListMailboxes contains correct mailbox name/path, but when i'm trying to iterate through received mailboxes i'm getting names/paths without separator.

Raw request/response for ListMailboxes:


aaac LIST "" "*"


* LIST (\Noinferiors \HasNoChildren) "\\" Inbox

* LIST (\Noinferiors \HasNoChildren) "\\" Trash

* LIST (\HasChildren) "\\" Untitled

* LIST (\HasNoChildren) "\\" "Untitled 2"

* LIST (\HasChildren) "\\" {13}


* LIST (\HasNoChildren) "\\" {23}


* LIST (\HasNoChildren) "\\" zzz_xxx

aaac OK LIST completed

As you can see raw response contains mailboxes Untitled\test and Untitled\test\testInner. But when i'm iterating through retrieved mailboxes and asking for names(mailboxes.GetName(i)) i get Untitledtest and UntitledtesttestInner.

LastErrorText also says that there was an error in escaping backslashes: Escaping quotes and backslashes in mailbox name...

full LastError text exists in prev. message.

Main question is how can i get correct mailboxes names?


answered Mar 24 '17 at 05:35

kolobkov's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 23 '17 at 14:41

Seen: 1,439 times

Last updated: Mar 24 '17 at 06:35

powered by OSQA