I have a C# program saving attachments from unread emails from Outlook mail box to a folder and the below line of code breaks(first line) for attachment types that are of OLE type with the error "Outlook cannot perform this action on this type of attachment"(Where 'it' is of type MailItem
).
string attachedfilename = it.Attachments[i].FileName;
it.Attachments[i].SaveAsFile("C:\\temp\\"+attachedfilename);
I have read articles on using http://www.dimastr.com/redemption/RDOMail.htm (library) to overcome this problem for Ole type attachments, but apart from this option can I make use of any other .NET Library to overcome this problem?
If yes, kindly share the code snippet in C#.