1

I am attempting to get a Chilkat IMAP component to attach to a public folder that can be seen in Outlook by a user.

Once I have connected to my IMAP server as that user and I issue:

IMAP.SelectMailbox('Inbox')

I can see the contents of my inbox, as expected.

The public folder that I see in Outlook is called "Elekta Orders", and is reported by Outlook as having a location of \\public Folders - simon.wood@chemigraphic.co.uk\All Public

https://cknotes.com/imap-select-public-folders/ suggests that I may need to set the SelectMailBox argument to something like: "public folders/elekta orders" or "public folders - simon.wood@chemigraphic.co.uk/elekta orders". When I do this, the SelectMailBox method returns the following:

ChilkatLog:
  SelectMailbox:
    DllDate: Jun 25 2020
    ChilkatVersion: 9.5.0.83
    UnlockPrefix: CHEMIGRAPHIMAPMAILQ
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    mailbox: public folders - simon.wood@chemigraphic.co.uk/elekta orders
    selectMailboxInner:
      mailboxPath: public folders - simon.wood@chemigraphic.co.uk/elekta orders
      separatorChar: .
      Escaping quotes and backslashes in mailbox name...
      utf7EncodedMailboxPath: public folders - simon.wood@chemigraphic.co.uk/elekta orders
      isOK:
        serverResponse: aaad NO "public folders - simon.wood@chemigraphic.co.uk/elekta orders" doesn't exist.
      --isOK
    --selectMailboxInner
    Retry using / for the separator char...
    selectMailboxInner:
      mailboxPath: public folders - simon.wood@chemigraphic.co.uk/elekta orders
      separatorChar: /
      Escaping quotes and backslashes in mailbox name...
      utf7EncodedMailboxPath: public folders - simon.wood@chemigraphic.co.uk/elekta orders
      isOK:
        serverResponse: aaae NO "public folders - simon.wood@chemigraphic.co.uk/elekta orders" doesn't exist.
      --isOK
    --selectMailboxInner
    Retry using . instead of / in the mailbox path...
    selectMailboxInner:
      mailboxPath: public folders - simon.wood@chemigraphic.co.uk.elekta orders
      separatorChar: .
      Escaping quotes and backslashes in mailbox name...
      utf7EncodedMailboxPath: public folders - simon.wood@chemigraphic.co.uk.elekta orders
      isOK:
        serverResponse: aaaf NO "public folders - simon.wood@chemigraphic.co.uk.elekta orders" doesn't exist.
      --isOK
    --selectMailboxInner
    Failed to select/examine mailbox
    mailbox: public folders - simon.wood@chemigraphic.co.uk/elekta orders
    imapSelectResponse: aaaf NO "public folders - simon.wood@chemigraphic.co.uk.elekta orders" doesn't exist.
    Failed.
  --SelectMailbox
--ChilkatLog

So I thought I'd look at the ListMailBoxes method to see what mailboxes are actually visible on the IMAP server.

When I issue mboxes := imap.listMailboxes, the LastErrorText shows the following:

ChilkatLog:
  ListMailboxes:
    DllDate: Jun 25 2020
    ChilkatVersion: 9.5.0.83
    UnlockPrefix: CHEMIGRAPHIMAPMAILQ
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    listMailboxes:
      bSubscribedOnly: 0
      reference: 
      mailbox: *
      Escaping quotes and backslashes in mailbox name...
      utf7EncodedMailboxPath: *
      isOK:
        serverResponse: aaah OK LIST completed.
      --isOK
      Success.
    --listMailboxes
    Success.
  --ListMailboxes
--ChilkatLog

Suggesting to me that the command has completed correctly, however when I look at the value of mboxes.count(), the number reported is something ridiculous like 18398748 and I cannot use mboxes.GetName() to return any folder names.

What am I doing wrong here?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
SimonW
  • 11
  • 1

0 Answers0