每封邮件都应密件抄送到第二个电子邮件地址。
我发现了VBA代码示例,例如:
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
' #### USER OPTIONS ####
' address for Bcc -- must be SMTP address or resolvable
' to a name in the address book
strBcc = "someone@somewhere.dom"
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " & _
"Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could Not Resolve Bcc Recipient")
If res = vbNo Then
Cancel = True
End If
End If
Set objRecip = Nothing
End Sub
如果我将代码添加到 Outlook,这将起作用。
由于我想在活动目录环境中使用它,我想通过GPO设置.
我安装了 Office 2016 ADML/ADMX 模板文件,但没有发现为发送的每封邮件配置自动密件抄送的选项。
我找到了Active Directory Outlook Signature – VBScript来设置电子邮件签名,并认为这可能会解决问题。
是否有可能(我不是 VBS 专家(编写一个在用户登录时运行的脚本,为发送的每封邮件添加密件抄送?
不,您不能通过 GPO 执行此操作 - 如果 Outlook 中的框功能会自动密件抄送,则没有输出。它必须在代码中完成 - 脚本或 COM 插件。