login about faq

Does ListMailboxes always return all the IMAP mailboxes? Or do I need to recurse using references?

asked Nov 27 '12 at 20:03

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


To return all mailboxes in the hierarchy, pass arguments as shown here:

    // Get the mailboxes.
    Chilkat.Mailboxes mboxes = imap.ListMailboxes("", "*");
    if (mboxes == null)
    {
        MessageBox.Show(imap.LastErrorText);
        return;
    } 

int i;
int n = mboxes.Count;
for (i=0; i<n; i++)
{
    // Add the mailbox name to a listBox.
    listBox1.Items.Add(mboxes.GetName(i));
}

The two arguments to the ListMailboxes method are passed directly to the IMAP server. Therefore, the method behaves exactly as specified by the IMAP RFC 3501. (The section of the RFC is duplicated in the Chilkat reference documentation for the ListMailboxes method.)

link

answered Nov 27 '12 at 20:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Nov 27 '12 at 20:07

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×174
×14
×1

Asked: Nov 27 '12 at 20:03

Seen: 1,411 times

Last updated: Nov 27 '12 at 20:07

powered by OSQA