login about faq

I'm trying to move an email between Mailboxes, but am getting an error but not sure how to resolve?

if (imap.Copy (uid,true,sMailbox) == true)

where uid contains a valid uid and sMailbox contains a mailbox name checked to exist.

        DllDate: Oct  1 2014
        UnlockPrefix: *********
        Username: CBDCCTX05:adam.dempsey
        Architecture: Little Endian; 32-bit
        Language: Visual C++ 8.0 (32-bit)
        VerboseLogging: 1
        Not in the selected state

Not sure what 'Not in the selected state' means?

asked Nov 20 '14 at 07:17

Dempsey's gravatar image


Make sure to read the online reference documentation for the Copy method:

bool Copy(int msgId, bool bUid, const char *copyToMailbox);

Copies a message from the selected mailbox to copyToMailbox...

You need to select the source mailbox. The "Not in the selected state" means you are connected and authenticated with an IMAP server, but you have no mailbox selected..


answered Nov 20 '14 at 11:38

chilkat's gravatar image

chilkat ♦♦

edited Nov 20 '14 at 11:38

That was it thanks! I did previously have the Mailbox selected but then moved some code around.

(Nov 21 '14 at 04:36) Dempsey
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: Nov 20 '14 at 07:17

Seen: 687 times

Last updated: Nov 21 '14 at 04:36

powered by OSQA