asp.net调用outlook发送邮件,提示我没有权限进行操作!
程序很简单:
Microsoft.Office.Interop.Outlook.Application outlookObj = new Microsoft.Office.Interop.Outlook.Application();
MailItem Item = (MailItem)outlookObj.CreateItem(OlItemType.olMailItem);
Item.To = receive + "@XXXXX.com.cn";
Item.Subject = subject;
Item.Body = body;
Item.Send();
在调试的时候都可以发邮件,但是发布以后就不能发了,提示:您没有执行此操作所需的相应权限。
或者:Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005.
请问如何解决?谢谢!