andyedinborough/aenetmail — Issue #31: GetMessages returns only one message
Author: Gwynnbleid1
Created: 2012-02-17 15:34:34+00:00
State: open

Hi. I downloaded today fresh copy of project, compiled id and I have folowing 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.