MailSystem.NET icon indicating copy to clipboard operation
MailSystem.NET copied to clipboard

imap4 exception - NO the specified message set is inavlid

Open maddisn opened this issue 8 years ago • 0 comments

For some odd reason the moveMessage method fails, it only moves a couple of emails and fails to finish the job.

I have been fighting this issue for over 2 weeks, and this is an important feature of my application. I tried this method with both gmail and outlook, but it still fails.

` public void EnsureMessagesCanBeMoved() { var _selectedMailBox = "Inbox"; var _targetMailBox = "Processed"; Mailbox finalMailbox;

        using (var client = new Imap4Client())
        {
            client.ConnectSsl("imap.gmail.com", 993);
            client.Login("secret", "secret");

            Mailbox mails = client.SelectMailbox(_selectedMailBox);
            var mailMessages = mails.Search("ALL");

            foreach(var x in mailMessages)
            {
                mails.MoveMessage(x, _targetMailBox);
            }

            finalMailbox = client.SelectMailbox("Processed");
            client.Disconnect();
        }

        Assert.AreEqual(15, finalMailbox.MessageCount);
    }

`

This test fails.

maddisn avatar Mar 22 '17 15:03 maddisn