是什么原因导致Outlook 2007提示“程序正在尝试代表您发送电子邮件?”

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

我在Outlook中构建了一个自定义表单,可以在任何时候发送更改时发送电子邮件通知。由于表单的规范,我不得不在表单的结束事件上发送电子邮件的表单中添加一些VBScript(不幸的是)。

该表格目前已发布并且运作良好。似乎正在出现的唯一问题是我是唯一一个使用以下对话框提示的表单的用户:

没有其他人使用该表单获取对话框。此对话框强制您等到进度条完成后才“允许”您发送电子邮件(大约5秒)。是因为我是出版商吗?或者它是我遇到的客户端设置?如何禁用这只小狗?

如果其相关的继承人来源:

Sub SendAttach() 
   'Open mail, adress, attach report
   Dim objOutlk             'Outlook
   Dim objMail                  'Email item
   Dim strMsg
   Const olMailItem = 0

  'Create a new message
   set objOutlk = createobject("Outlook.Application")
   set objMail = objOutlk.createitem(olMailItem)
   objMail.To = Item.UserProperties("Assigned To")
   objMail.cc = Item.UserProperties("Bcc")

   'Set up Subject Line
   objMail.subject = "Work Order Notifications: " & Item.UserProperties("Work Order Number") & " - " & _
                Item.UserProperties("Subject") & " Due " & Item.UserProperties("Due Date")

   'Add the body    
   strMsg = Item.UserProperties("Specifications") & vbcrlf
   strMsg = strMsg & Item.UserProperties("Constraints")

   objMail.body = strMsg
   objMail.display 'Use this to display before sending, otherwise call objMail.Send to send without reviewing

   objMail.Send
   'Clean up
   set objMail = nothing
   set objOutlk = nothing
End sub

这里的安全不是问题。如果有人设法开始从我的工作站发送电子邮件,我有比电子邮件欺骗更大的问题!

作为旁注,我无法确定SO或SU是否是这个问题的最佳位置。如有必要,请相应地重定向。

vbscript outlook-2007
4个回答
3
投票

我不久前遇到了这个问题,同时试图完成稍微不同的事情,但为了这个目的是相同的。香港提供的链接有助于理解正在发生的事情,但最终我选择不使用页面上讨论的任何选项。相反,我保持简单,并决定愚弄Outlook认为我发送电子邮件而不是自动化过程,我这样做是通过用SendKeys替换来替换objMail.Send来模仿自己按下发送按钮,有点难看但工作在我的情况下。

编辑:

您可以使用此sendkeys语句:

SendKeys "%{s}", 1

这基本上调用Alt + S,触发outlook发送按钮。


1
投票

三种选择

- Use a pc without the MS Outlook security patch
- Use the redemption ocx (google it up to download)
- Use SMTP instead of outlook

这里的第二个选项是一个例子

Function sendmail2 (sRecipient, sSubject, sMsg, sAttach)
    on error resume next
    dim SafeItem, oItem  
    set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem 
    set oItem = oApp.CreateItem(0) 'Create a new message
    With SafeItem
      .Item = oItem 'set Item property 
      .Recipients.Add sRecipient
      .Recipients.ResolveAll 
      .Subject = sSubject
      .HTMLBody = sMsg
      .Send 
    End With
  End Function

0
投票

我遇到了同样的问题,因为我的应用程序在Windows 7上运行,我能够使用Windows Mail Client(wlmail.exe)发送电子邮件而不是MS Outlook。使用Wlmail时,警告仍然出现在默认行为中,但是有一个选项可以通过转到选项>安全选项卡来关闭警告,一旦关闭它,程序就可以发送邮件而不会弹出。


0
投票

另一种可能的解决方法是更新计算机上的注册表设置。

https://support.microsoft.com/en-gb/help/3189806/a-program-is-trying-to-send-an-e-mail-message-on-your-behalf-warning-i

此链接概述了如何识别相关的注册表项以及应设置的值。这允许您覆盖信任中心设置。

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