简体   繁体   English

SMTP 具有加密权限的邮件 Outlook

[英]SMTP mail with encrypt permission Outlook

When I send a mail with the option "Encrypt only" in Outlook当我在 Outlook 中发送带有“仅加密”选项的邮件时在此处输入图像描述

I receive a mail like this:我收到这样的邮件:

在此处输入图像描述

Currently, I use SMTPClient with MailMessage to send mail:目前,我使用 SMTPClient 和 MailMessage 来发送邮件:

MailMessage message = new MailMessage();
message.From = from;
MailAddress to = new MailAddress(destString);
message.To.Add(to);
message.Subject = subject;
smtpClient.Send(message);

How can I modify my code to send a mail and receive it as the mail above?如何修改我的代码以发送邮件并将其作为上述邮件接收?

After some researching, I found a solution by using Interop but I can't use it in my project.经过一番研究,我找到了使用 Interop 的解决方案,但我无法在我的项目中使用它。

var app = new Microsoft.Office.Interop.Outlook.Application();
var item = (Microsoft.Office.Interop.Outlook.MailItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
item.To = abc@gmail.com;
item.Subject = "test";
item.Permission = Microsoft.Office.Interop.Outlook.OlPermission.olDoNotForward;
item.PermissionService = Microsoft.Office.Interop.Outlook.OlPermissionService.olWindows;
item.Send();

As far as I understand Outlook puts the message in a secure server (Office 365 in my case) and sends the recipient a link to open that message.据我了解,Outlook 将邮件放入安全服务器(在我的情况下为 Office 365),并向收件人发送打开该邮件的链接。

It is stated in this url , this feature is only for some licenses.此 url中有说明,此功能仅适用于某些许可证。

Microsoft 365 Message Encryption is part of the Office 365 Enterprise E3 license. Microsoft 365 邮件加密是 Office 365 Enterprise E3 许可证的一部分。 Additionally, the Encrypt-Only feature (the option under the Encrypt button) is only enabled for subscribers (Microsoft 365 Apps for enterprise users) that also use Exchange Online.此外,仅加密功能(加密按钮下的选项)仅对也使用 Exchange Online 的订阅者(适用于企业用户的 Microsoft 365 应用)启用。

I cannot find an API or library documentation, but you should try to communicate with your MS representative about this, so they can provide more information.我找不到 API 或库文档,但您应该尝试与您的 MS 代表沟通,以便他们提供更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM