login about faq

Here is my code to get the message

public Chilkat.Email GetMessage(string folder, int messageId, bool peek = false) { Chilkat.Email email = null;

        try
        {
            login();

            imap.PeekMode = peek;

            assertSuccess(imap.SelectMailbox(folder));
            email = imap.FetchSingle(messageId, UseUids);
            assetNotNull(email);
        }
        finally
        {
            logout();
        }

        return email;
    }

Here is my code to delete the email

   public void MoveToFolder(Chilkat.MessageSet messageSet, string sourceFolder, string destinationFolder)
    {
        if (sourceFolder != destinationFolder)
        {
            try
            {
                login();

                //message set contains sequence numbers
                messageSet.HasUids = UseUids;

                //set mailbox context
                assertSuccess(imap.SelectMailbox(sourceFolder));

                //copy messages to destination folder
                assertSuccess(imap.CopyMultiple(messageSet, destinationFolder));

                //delete messages from source folder
                assertSuccess(imap.SetFlags(messageSet, FlagDeleted, 1));

                //permanently removes from the currently selected mailbox all messages that have the Deleted flag set
                assertSuccess(imap.Expunge());
            }
            finally
            {
                logout();
            }
        }
    }

Now i delete a message with UID of 10 and then try and get a message with UID 10 fetch single still returns an empty email with an id of 10 and the flags are set to not deleted.

Why is it saying it recovered a deleted email when it clearly returned an empty email?

asked Sep 15 '14 at 17:41

Chris's gravatar image

Chris
12


What is the actual value of your UseUids variable? If it is false, then you are using sequence numbers. If you delete sequence number 10, then on the next go-around, the email that was previously sequence number 11 will now be sequence number 10.

link

answered Sep 16 '14 at 12:01

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

UseUids is set to true. I have also tried entering a message id of like 535 which absolutely cannot exist for that mailbox as there have not been that many messages in the box. It still returns a blank email with an id of 535. Basically i cannot determine if the email it returns is a good email or bad email.

(Sep 16 '14 at 12:33) Chris
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:

×11
×6

Asked: Sep 15 '14 at 17:41

Seen: 777 times

Last updated: Sep 16 '14 at 12:35

powered by OSQA