GetMessage gives "Object reference not set to an instance of an object" error.

Feb 20, 2015 at 2:18 PM
Edited Feb 20, 2015 at 2:19 PM

Hello I am getting the following error from the code below.

code:

MailMessage objMailMessage = objImapClient.GetMessage(objSearchResultList.MailIndexList[j]);

Error

InnerException = No Inner Exception Found
Message = Object reference not set to an instance of an object.
Source : HigLabo.Mail
StackTrace : at HigLabo.Net.Imap.ImapClient.GetMessageText(String text)
at HigLabo.Net.Imap.ImapClient.GetMessage(Int64 mailIndex, Boolean setAsSeen)
at HigLabo.Net.Imap.ImapClient.GetMessage(Int64 mailIndex)
at IQEmailExtractor.Program.ConnectToEmailServer(List`1 objLstGenericInvoicesImport, String GroupID, StringBuilder strLogFileBuilder) in D:\Projects_Temp\IQDocumentCenter\EXTRACTORS\IQEmailExtractor\IQEmailExtractor\Program.cs:line 291
TargetSite : System.String GetMessageText(System.String)
HelpLink : No HelpLink Found
Coordinator
Feb 26, 2015 at 1:32 PM
Hi.

Could you show me the response text?
at this line.
HigLabo.Net.Imap.ImapClient.GetMessageText(String text)