MailSystem.NET icon indicating copy to clipboard operation
MailSystem.NET copied to clipboard

[Error] System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

Open jasonchen100 opened this issue 8 years ago • 0 comments

Hi,

I have this issue couple times. I have two window services running in different machines and connect to different email accounts (MS Exchange server 2013). Structure are as follows:


email account A : (1) receive emails and redirect a copy to email account B (2) A window service will read emails and do what I code.

email account B: a service will read emails which redirect from email account A

*Both services runs same code, the difference are just point to different email account. (account A and account B)

But I received error as follows at account A's window service

Error: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at ActiveUp.Net.Mail.Fetch.ExtractMessageFromReponse(String response) at ActiveUp.Net.Mail.Fetch.MessageString(Int32 messageOrdinal) at ActiveUp.Net.Mail.Fetch.MessageObject(Int32 messageOrdinal)

I debug and find out that "ActiveUp.Net.Mail.Fetch.MessageObject" will fail but ActiveUp.Net.Mail.Fetch.HeaderObject(UnSeenMessage) can pass. I have run at least several months for over thousands of emails, only those certain email will fail ,but it works fine to those redirect emails.

Please advise.

jasonchen100 avatar Jan 19 '18 01:01 jasonchen100