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")

ChilkatLog:
  Copy:
    DllDate: Aug  5 2012
    UnlockPrefix: BUNDESIMAPMAILQ
    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"
    getCompleteResponse:
      ImapCmdResp: aaag BAD The specified message set is invalid.
    --getCompleteResponse
    Failed to find OK line in response.
    imapCopyResponse: aaag BAD The specified message set is invalid.
    Failed.
  --Copy
--ChilkatLog

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

URck
1111


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
    ...
else  
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

link

answered Nov 09 '12 at 08:46

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks for your hints (I use fetchbundle); the answer in
http://www.chilkatforum.com/questions/536/imap-get-uid-results-in-0
solved my problem.

link

answered Nov 12 '12 at 03:36

URck's gravatar image

URck
1111

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
×11
×9

Asked: Nov 09 '12 at 08:03

Seen: 2,275 times

Last updated: Nov 12 '12 at 03:36

powered by OSQA