login about faq

I want to copy a mail via IMAP into an other folder - VB.ActiveX Code and ErrorLog see below:

'  Copy to a folder named "Gelöschte Elemente"
success = imap.Copy(Email.GetImapUid, 1, "Gelöschte Elemente")

    DllDate: Aug  5 2012
    Username: PC47052:adbm
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    mailbox: Gelöschte Elemente
    utf7EncodedMailboxName: Gel&APY-schte Elemente
    Command: aaag UID COPY -1 "Gel&APY-schte Elemente"
    ImapCmdSent: aaag UID COPY -1 "Gel&APY-schte Elemente"
      ImapCmdResp: aaag BAD The specified message set is invalid.
    Failed to find OK line in response.
    imapCopyResponse: aaag BAD The specified message set is invalid.

With Release 9.3.0 it worked well; with 9.3.2 I get the obove error. (The National Character "ö" in the folder name seems to make a problem.)

asked Nov 09 '12 at 08:03

URck's gravatar image


The problem shouldn't be the character "ö".

I noticed that the integer value -1 is used for the UID in the COPY command sent to IMAP, which tells me that the call to Email.GetImapUid must have returned -1. The problem is not with the Copy method, but with the GetImapUid method.

As an aside, if a Chilkat method can return a value indicating failure, such as -1, false, NULL, etc., then it's not a good idea to insert the method call directly into the argument list of another method call. It's better to make the call on a separate line and check for the error condition. For example:

uid = email.GetImapUid()
if (uid = -1) then
success = imap.Copy(uid, 1, "Gelöschte Elemente") endif

If the GetImapUid method returns -1, it means the "ckx-imap-uid" header field was not present. If the FetchSingle method was called to download the email, see this Chilkat Forum topic for more information about it: http://www.chilkatforum.com/questions/1492/cant-delete-imap-mail-vbscript


answered Nov 09 '12 at 08:46

chilkat's gravatar image

chilkat ♦♦

Thanks for your hints (I use fetchbundle); the answer in
solved my problem.


answered Nov 12 '12 at 03:36

URck'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: Nov 09 '12 at 08:03

Seen: 5,076 times

Last updated: Nov 12 '12 at 03:36

powered by OSQA