I have a ASP.NET web application that uses Microsoft Outlook MailItem OlItemType to email from the application. Outlook has been installed on the IIS server. When I try to open the email I get the below error message:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).
It looks to be a permission issue. However, I am not sure how to fix. Below is my code that calls the mail object.
Outlook.Application objApp = new Outlook.Application();
Outlook.MailItem objMailItem = objApp.CreateItem(Outlook.OlItemType.olMailItem);
objMailItem.Subject = "Dear, " + strSubject;
objMailItem.To = email;
objMailItem.Display(true);
User contributions licensed under CC BY-SA 3.0