Invalid cast error ! While converting Undeliverable mail item as Outlook mail ! Why?

  • Thread starter Thread starter ksskumar
  • Start date Start date
K

ksskumar

Hi friends,

I try to convert a Undeliverable mail (created by Outlook-System
Adminstrator). But the program through the error, "Specified cast is
not valid".

Code sample,

Redemption.SafeMailItem rMailItem = new
Redemption.SafeMailItemClass();
rMailItem.Item = ((Microsoft.Office.Interop.Outlook.MailItem)Connect.oOlMailItems[1]);

This code is working as expected for the normal received mails.

Please any one let me know, what is the problem and how to solve it.

Thanks in advance
 
Back
Top