自动允许以编程方式访问Outlook [英] Automatically Allow Programmatic Access to Outlook

查看:329
本文介绍了自动允许以编程方式访问Outlook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

公司交换服务器上存在一个公共共享文件夹.

There is a Public Shared Folder that exists on a corporate exchange server.

我正在尝试连接到Outlook文件夹,并监视它的传入邮件.

I am trying to connect to the outlook folder, and monitor it for incoming mail.

但是,当我连接时,我的Outlook本地实例会提示我获得许可.

However, When I connect, my local instance of Outlook prompts me for permission.

是否有规避此提示的提示?

Is there anyway to circumvent this prompt?

我尝试添加相关的MAPI注册表值,但仍在提示.

I tried adding relevant MAPI registry values, but it is still prompting.

有什么想法吗?

我正在设置的注册表(python)

Registry I am setting (python)

opened_key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r'SOFTWARE\Microsoft\Office\14.0\Outlook\Security')
winreg.SetValueEx(opened_key, 'PromptSimpleMAPISend', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptSimpleMAPINameResolve', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptSimpleMAPIOpenMessage', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptOomAddressBookAccess', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptOomFormulaAccess', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptOomSaveAs', 0, winreg.REG_DWORD, 2)

winreg.SetValueEx(opened_key, 'PromptOomAddressInformationAccess', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptOomMeetingTaskRequestResponse', 0, winreg.REG_DWORD, 2)
winreg.SetValueEx(opened_key, 'PromptOomSend', 0, winreg.REG_DWORD, 2)

winreg.CloseKey(opened_key)

推荐答案

如果在阅读MailItem.Body属性时得到提示,您的解决方法将列在

If you get prompt when reading the MailItem.Body property, your workarounds are listed at http://www.outlookcode.com/article.aspx?id=52.

上面的注册表项将无效.您可以选择扩展MAPI(仅限C ++或Delphi),MAPI包装器,例如 Redemption (可以是通过Python访问)或ClickYes之类的应用.

The registry keys above will do nothing. Your options are Extended MAPI (C++ or Delphi only), MAPI wrapper such as Redemption (which can be accessed form Python) or an app like ClickYes.

这篇关于自动允许以编程方式访问Outlook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆