Y
yads12
I don't know which group to post this to, but I have noticed Dimitry
post replies to this group so maybe he can help me out. I have written
a C# app using Outlook Redemption to send an email. Here is the code in
question
Outlook.Application olApp = new Outlook.ApplicationClass();
Outlook.NameSpace olNS = olApp.GetNamespace("MAPI");
olNS.Logon(Missing.Value, Missing.Value, false, false);
SafeMailItem sItem = new Redemption.SafeMailItem();
Outlook.MailItem olItem =
olApp.CreateItem(Outlook.OlItemType.olMailItem) as
Outlook.MailItem;
sItem.Item = olItem;
sItem.Recipients.Add("(e-mail address removed)");
Running on a Windows XP machine with Outlook 2003 the code works fine.
However when I run it on a Windows 2003 Server with Outlook 2003 the
code crashes when the Recipients property is accessed. Redemption
throws the following exception:
System.Runtime.InteropServices.COMException (0x8000FFFF): Could
retrieve IMessage: Interface not supported
at Redemption.SafeMailItemClass.get_Recipients()
If I just use regular Outlook automation the code works fine, but using
Redemption causes the exception. The Redemption dll has been registered
properly.
post replies to this group so maybe he can help me out. I have written
a C# app using Outlook Redemption to send an email. Here is the code in
question
Outlook.Application olApp = new Outlook.ApplicationClass();
Outlook.NameSpace olNS = olApp.GetNamespace("MAPI");
olNS.Logon(Missing.Value, Missing.Value, false, false);
SafeMailItem sItem = new Redemption.SafeMailItem();
Outlook.MailItem olItem =
olApp.CreateItem(Outlook.OlItemType.olMailItem) as
Outlook.MailItem;
sItem.Item = olItem;
sItem.Recipients.Add("(e-mail address removed)");
Running on a Windows XP machine with Outlook 2003 the code works fine.
However when I run it on a Windows 2003 Server with Outlook 2003 the
code crashes when the Recipients property is accessed. Redemption
throws the following exception:
System.Runtime.InteropServices.COMException (0x8000FFFF): Could
retrieve IMessage: Interface not supported
at Redemption.SafeMailItemClass.get_Recipients()
If I just use regular Outlook automation the code works fine, but using
Redemption causes the exception. The Redemption dll has been registered
properly.