擅长:python、mysql、java
<p>您似乎在Outlook中遇到了安全问题</p>
<p>当您尝试从外部应用程序自动化Outlook时,<code>Send</code>方法可能会引发异常。如果您试图访问任何受保护的属性或方法,它也可以是Outlook发出的提示。但对你来说,这是个例外。您会收到安全提示/异常,因为Outlook是通过以下方式之一在客户端计算机上配置的:</p>
<ul>
<li>使用默认的Outlook安全设置(即未设置组策略)</li>
<li>使用组策略定义的安全设置,但未应用编程访问策略</li>
<li>使用组策略定义的安全设置,该组策略设置为在防病毒软件处于非活动状态或过期时发出警告</li>
</ul>
<p>如果系统上安装了任何最新的防病毒软件,您可以创建一个组策略,以防止显示安全提示,或者仅关闭这些警告(实际上不建议这样做)</p>
<p>在<a href="https://docs.microsoft.com/en-us/office/vba/outlook/How-to/Security/security-behavior-of-the-outlook-object-model" rel="nofollow noreferrer">Security Behavior of the Outlook Object Model</a>文章中阅读更多关于这方面的内容</p>
<P>您也可以考虑使用Outlook构建的低级代码,而不提供安全性问题——扩展MAPI。考虑在API周围使用任何第三方包装,如<a href="https://www.dimastr.com/redemption" rel="nofollow noreferrer">Redemption</a>。<p>
<p>另一个选项是<a href="https://www.add-in-express.com/outlook-security/index.php" rel="nofollow noreferrer">Outlook Security Manager</a>,它允许在运行时动态抑制Outlook安全问题</p>