Catastrophic Failure while accessing Redemption.SafeMailItem.To and Recipients

  • Thread starter Thread starter jisha
  • Start date Start date
J

jisha

Hi,
I have a C# application in which I am using Redemption.dll version 4.
0.0.452.In this application I am trying to access Outlook 2003 MailItem, by
setting that item as Redemption.SafeMailItem (sMailItem) .Trying to access
sMailItem.To and later i am accessing Redemption.Recipient address.At that
point this is sometimes giving Catastrophic Error(details below).Can you tell
me why this is happening ? What is the solution?
Error details

“Details : Catastrophic failure
At Redemption.SafeMailItemClass.get_To()”
 
Try to create and instantiate a global (class) variable that points to a
Redemption object - any object, such as Redemption.MAPIUtils.
Based on the source code that you sent to my private e-mail address, you
loop through multiple messages in Outlook and process them using
SafeMailItem.
Every Safe*Item (and MAPIUtils) object calls MAPIInitialize when created and
MAPIUninitialize when destroyed. Due to a bug in MAPI, calling
MAPIInitialize/MAPIUninitialize a few hundred times results in an error.
Having a global Redemption object ensures that MAPI is initialized only
once.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top