andyedinborough / aenetmail

C# POP/IMAP Mail Client
369 stars 153 forks source link

GetMessages returns only one message #31

Closed Gwynnbleid1 closed 12 years ago

Gwynnbleid1 commented 12 years ago

Hi. I downloaded today fresh copy of project, compiled id and I have following problem with this code:

        using (var imap = new ImapClient("imap.gmail.com", "user", "pass", ImapClient.AuthMethods.Login, 993, true))
        {
            imap.SelectMailbox(@"INBOX");
            textBox1.AppendText(imap.GetMessageCount() + Environment.NewLine);
            // Get the first *11* messages. 0 is the first message;
            // and it also includes the 10th message, which is really the eleventh ;)
            // MailMessage represents, well, a message in your mailbox
            MailMessage[] mm = imap.GetMessages(0, 10);
            foreach (MailMessage m in mm)
            {
                textBox1.AppendText(m.ContentType + Environment.NewLine);
                textBox1.AppendText(m.Charset + Environment.NewLine);
                textBox1.AppendText(m.ContentTransferEncoding + Environment.NewLine);
                textBox1.AppendText(m.Subject + Environment.NewLine);
            }
        }

Problem is it returns only one message, when GetMessageCount() returns 67 messages.

andyedinborough commented 12 years ago

Wow. Unit tests completely missed this. :/ Working on it.

Gwynnbleid1 commented 12 years ago

I'm glad that I didn't do anything wrong :) I was afraid that something so simple couldn't be missed. I'm waiting for solution :) Thanks for fast response and sorry for bad English :)

2012/2/17 Andy Edinborough < reply@reply.github.com

Wow. Unit tests completely missed this. :/ Working on it.


Reply to this email directly or view it on GitHub: https://github.com/andyedinborough/aenetmail/issues/31#issuecomment-4025241

andyedinborough commented 12 years ago

Fixed in the latest source. I removed the BlockingCollection that was concurrently reading from the stream.

Gwynnbleid1 commented 12 years ago

Number of mails returned are correct now, but a lot of them where downloaded with no subject, where all email have one.

2012/2/17 Andy Edinborough < reply@reply.github.com

Fixed in the latest source. I removed the BlockingCollection that was concurrently reading from the stream.


Reply to this email directly or view it on GitHub: https://github.com/andyedinborough/aenetmail/issues/31#issuecomment-4029053