Supress Outlook弹出窗口允许在R中访问

问题描述 投票:1回答:1

我已经在R中创建了一个脚本,该脚本可以在Outlook中的邮件中查找所需的电子邮件。事实是,脚本每次尝试访问我的电子邮件时,都会弹出一个窗口并寻求许可。该脚本可以按预期工作,但是由于每次都要单击“允许”,所以该过程变慢了。我已经读过,可以允许程序在Trusct Center选项中输入我的Outlook,但是Windows版本太旧了,无法通过这种方式修复。另外,由于这是一台共享服务器,并且我没有管理员访问权限,所以无法进行重大更改。我读过其他类似的问题,但在R中什么也没有,例如this [Suppress Outlook pop-up allow access或this [How to supress the outlook pop up message while sending mails in PB8]。这是我的脚本:

library(RDCOMClient)
library(stringr)

#Folder in OutLook where to look for the emails
folderName = "Specific folder"

OutApp <- COMCreate("Outlook.Application")
outlookNameSpace = OutApp$GetNameSpace("MAPI")

folder <- outlookNameSpace$Folders(1)$Folders(folderName)
folder$Name(1)
emails <- folder$Items

for (i in 1:emails()$Count()){
  subject <- emails(i)$Subject() #Get the subject of the email

  #If the subject of the email has an specific string print the body of the message
  if (grepl("Subject to look for", subject)== TRUE){
    body <- emails(i)$Body() # Here asks for permission
    print(body)
  }
}

有没有办法嵌入一段代码来避免此弹出窗口或自动“单击”允许?

r outlook access
1个回答
0
投票

看来您在Outlook中面临标准安全提示。您可以通过以下路线前往:

  1. 使用Outlook所基于的低级代码-扩展MAPI或围绕此API的任何其他第三方包装程序,如Redemption。]

  2. 使用旨在在Outlook中关闭此类安全触发器的第三方组件-Security Manager for Microsoft Outlook

  3. [设置组策略以避免此类触发。

  4. 在系统上设置有效的防病毒软件。

© www.soinside.com 2019 - 2024. All rights reserved.