如何在VB.Net中为Azure信息保护自动分类Outlook电子邮件敏感度?
我正在使用vb.net开发一个windows,试图通过outlook发送电子邮件。我的代码运行正常,但一旦它到达send()行,Azure Information Protection的一个弹出窗口将选择电子邮件敏感度(公共、机密等),因此在用户选择之前不会发送电子邮件 我尝试过(OutlookMessage.Sensitivity=outlook.OlSensitivity.olNormal) 但是,仍然需要一些人从Azure弹出窗口中选择分类,完整代码如下所示如何在VB.Net中为Azure信息保护自动分类Outlook电子邮件敏感度?,vb.net,winforms,azure,outlook,Vb.net,Winforms,Azure,Outlook,我正在使用vb.net开发一个windows,试图通过outlook发送电子邮件。我的代码运行正常,但一旦它到达send()行,Azure Information Protection的一个弹出窗口将选择电子邮件敏感度(公共、机密等),因此在用户选择之前不会发送电子邮件 我尝试过(OutlookMessage.Sensitivity=outlook.OlSensitivity.olNormal) 但是,仍然需要一些人从Azure弹出窗口中选择分类,完整代码如下所示 Dim OutlookMess
Dim OutlookMessage As outlook.MailItem
Dim AppOutlook As New outlook.Application
Try
OutlookMessage = AppOutlook.CreateItem(outlook.OlItemType.olMailItem)
Dim Recipents As outlook.Recipients = OutlookMessage.Recipients Recipents.Add("myemail@hotmail.com")
OutlookMessage.Subject = "Sending through Outlook"
OutlookMessage.Body = "Testing outlook Mail"
OutlookMessage.BodyFormat = outlook.OlBodyFormat.olFormatHTML
OutlookMessage.Sensitivity = outlook.OlSensitivity.olNormal
OutlookMessage.Send()
Catch ex As Exception
MessageBox.Show("Mail could not be sent") 'if you dont want this message, simply delete this line
Finally
OutlookMessage = Nothing
AppOutlook = Nothing
End Try
希望代码使用服务帐户运行,请执行以下操作
希望代码使用服务帐户运行,请执行以下操作