Outlook Redemption MAPI_E_TOO_BIG

Hello

I would like to use redemption to save attachments (embedded messages) directly to an outlook folder.
When I iterate through the inbox, I encounter the following error after 250 mails (thats the limit by the exchange server):
Error in IMAPISession::OpenEntry: MAPI_E_TOO_BIG

How do I release the objects correctly ?

Please help
Thanks very much
Best regards
Heinz Dumfart

' sample code (vb.net 2005) just to test iterating:
&
oMyRDOSession = New Redemption.RDOSession
oMyRDOSession.Logon("PROFILENAME")
oMyRDOInbox = MyRDOSession.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderInbox)
 
For i = 1 To oMyRDOInbox.Items.Count
  oMyRDOMail = oMyRDOInbox.Items(i)
  Debug.WriteLine(i & vbTab & oMyRDOMail.Subject)
  oMyRDOMail = Nothing
End If
 
oMyRDOSession.Logoff()
&

Open in new window

duh123Asked:
Who is Participating?
 
duh123Connect With a Mentor Author Commented:
Got support from the developer of Redemption...

Sulution: Do *not* use multiple dot notation and use Marshal.ReleaseComObjects

That works fine!


'Do NOT use eg. 
x = objRDOMail.Attachments.Count
 
'but use:
objAttachments = objRDOMail.Attachments
x = objAttachments.Count
Marshal.ReleaseCOMObject(objAttachments)

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.