jjzjj

c# - 如果 Outlook 打开,则只能通过 Outlook 发送电子邮件

我想按照说明使用Outlook发送电子邮件here.只要我已经打开Outlook,它就可以正常工作。因此,例如,如果将Outlook最小化并执行我的代码,那么我就可以很好地发送电子邮件。但是,如果Outlook关闭,则会出现异常:{System.Runtime.InteropServices.COMException(0x80004004):Operationaborted(ExceptionfromHRESULT:0x80004004(E_ABORT))atMicrosoft.Office.Interop.Outlook._MailItem.get_Recipients()atOut