我一直在网上搜索如何发送带有附件作为机密的电子邮件。我已经能够创建一个脚本来发送带有附件的电子邮件,但我不知道如何将其作为机密发送。
如果有人可以帮助我如何在 VBScript 中设置电子邮件敏感度,我将不胜感激。
这是我的代码:
Call Email
sub Email
Set objEmail = CreateObject("CDO.Message")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objEmail.From = "myemail"
objEmail.To = "SendToEmail"
ObjEmail.Subject = "Email Title"
ObjEmail.Textbody = "Email Body"
objEmail.AddAttachment "C:\Temp\ERSD\dchmar_" & sDate & ".txt"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="xx.xx.xx.xx"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/exchange/sensitivity") = 3
objEmail.Configuration.Fields.Update
objEmail.Send
End sub