Dear Coders,
I've just started using your ImapX library to retrieve and read mails from gmail.
Now, everything is working fine and it's a great library.
However, when i'm trying to mark a mail read using the Message.Process() option, it returns the IndexOutOfRangeException.
```
foreach (ImapX.Message message in GmailUser.Instance.Messages.OrderByDescending(w => w.Date))
{
if (SendWebRequest(url))
{
message.Process();
amountRead++;
Dispatcher.BeginInvoke(new MethodInvoker(delegate
{
this.btnRead.Content = "Read [" + amountRead + "/" + GmailUser.Instance.Messages.Count + "]";
}));
}
else
{
failedMessages.Add(message);
}
}
```
Thanks in advance.
Yours Sincerely,
Lars
Comments: ** Comment from web user: pavel_azanov **
I've just started using your ImapX library to retrieve and read mails from gmail.
Now, everything is working fine and it's a great library.
However, when i'm trying to mark a mail read using the Message.Process() option, it returns the IndexOutOfRangeException.
```
foreach (ImapX.Message message in GmailUser.Instance.Messages.OrderByDescending(w => w.Date))
{
if (SendWebRequest(url))
{
message.Process();
amountRead++;
Dispatcher.BeginInvoke(new MethodInvoker(delegate
{
this.btnRead.Content = "Read [" + amountRead + "/" + GmailUser.Instance.Messages.Count + "]";
}));
}
else
{
failedMessages.Add(message);
}
}
```
Thanks in advance.
Yours Sincerely,
Lars
Comments: ** Comment from web user: pavel_azanov **
I updated the source code, the problem should be solved now, as the GetPart method now returns an empty string if the _emailItems array is empty.
Please check it, and let me know if the fix is alright.
Best regards,
Pavel Azanov