This project is read-only.

ProcessHeader() Method is not working after few folders iteration

Topics: Issues
Feb 23, 2014 at 6:54 AM
Hi,
I use IMAPX 2.0.0.9, and my tool downloads emails from yahoo, gmail and hotmail, in my scenario I get list of all emails of each folder and then process header with ProcessHeader(), if I already have messageId in my database i don't download it otherwise I download that message, the issue is after iteration on first few folders (2-3 folders) ProcessHeader() doesn't give me header details and all is 0 or null, here is my code:
messages = client.Folders[folder.Name].Search("ALL", false);
messages = messages.OrderByDescending(m => m.MessageUid).ToList();
                if (messages.Count > 0)
                {
                    foreach (ImapX.Message message in messages)
                    {
                            message.ProcessHeader();
                            if (message.MessageId != null && !mailRepo.MessageExist(new MailMessage() { MessageId = message.MessageId }))

                            {
                                message.Process();
                                 //Download it
                             }
                        }
                   }
Coordinator
Feb 23, 2014 at 12:00 PM
Hi ehsan63,

do you have to use the version 2.0.0.9 for any specific reason? How about upgrading your code to the latest version? It provides extended features on limiting the amount of data to be downloaded, which definitly will make your application faster. I can also provide help upgrading your code.

Best regards,

Pavel
Feb 23, 2014 at 2:17 PM
Hi Pavel,
I have to use this version at the moment as my whole application works under this version, do you have any idea what's wrong with this weird issue?
Thanks