We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IMAP Problems with Reading Email

I am accessing the IMAP.US.ARMY.MIL (AKO) server. So far the only version of .Network that is working is version 4.6.01, but it has the problem of being incredibly slow. It takes about 4 minutes to read one email message from the above server. Versions after that either had problems with the flags not being set correctly or the uniqueid. With the latest version, the flags appear to be correct, but the uniqueid is null.

Thanks for any help. Theresa

Hi Theresa,

I did some tests with different versions of IMAP servers (MailEnable, hMailServer etc) and I could get the UniqueID property after calling the ListMessages() method. Could you please tell us which IMAP server is used by your service provider, so that we could do some tests?

Could you please also try getting the messages with SequenceNumber?

ImapClient client = new ImapClient(“host1”, port, “user”, “pwd”);
ImapMessageInfoCollection msgInfoCollection = client.ListMessages();
foreach (ImapMessageInfo msgInfo in msgInfoCollection)
MailMessage msg = client.FetchMessage(msgInfo.SequenceNumber);
msg.Save(msgInfo.SequenceNumber + “.msg”, MailMessageSaveType.OutlookMessageFormat);


We are using IMAP.US.ARMY.MIL as our IMAP server on port 993. In order to test it yourself, you will need to request an AKO (Army Knowledge Online) account. If you email me directly, I can give you instructions on getting an account.

I did try to using the Sequence Number, and I was able to access the mail message. However, our messages have attachments and using the Sequence Number caused the attachment to be read differently and will not work with my code as is.