Everything works until the loop enters the last email.
Then a message appears "NativeErrorCode: 87 GetMail [oInfo]"
The error is generated by: Set oMail = oClient.GetMail(Info)
For i = 1 To iNumMessages
Dim Info As EAGetMailObjLib.MailInfo
Set Info = infos.Item(i)
Dim oMail As EAGetMailObjLib.mail
Set oMail = oClient.GetMail(Info)
Dim oHeaders
Set oHeaders = oMail.Headers
For J = 0 To oHeaders.Count - 1
Dim EmailID As String
Dim oHeader
Set oHeader = oHeaders.Item(J)
MsgBox oHeader.HeaderKey & ":" & oHeader.HeaderValue & Chr(13) & Chr(10)
Next i
what could be the problem?