通过 VBA 以编程方式加密 Outlook 邮件 [英] Encrypt Outlook Mail Programmatically via VBA
问题描述
我正在寻找一种在 Outlook 2013 中通过 VBA 代码加密和发送 Outlook 邮件的方法.
I am looking for a way to encrypt and send Outlook mail via VBA code in Outlook 2013.
我希望我可以访问邮件对象并调用类似加密"的方法.
I was hoping I could access the mail object and call something like an "encrypt" Method.
Microsoft 表示,Microsoft Outlook 对象模型不提供以编程方式对邮件消息进行签名或加密的直接支持",但可以为其构建解决方案.(https://support.microsoft.com/de-de/help/2636465/how-to-sign-or-encrypt-mail-messages-programmatically)
Microsoft says, that "The Microsoft Outlook object model does not provide direct support to sign or encrypt mail messages programmatically", but it is possible to build a solution for it. (https://support.microsoft.com/de-de/help/2636465/how-to-sign-or-encrypt-mail-messages-programmatically)
我知道我可以手动加密邮件,但我想以编程方式访问它.也许我可以像事件一样调用,或者在设置此属性时调用的东西.
I know I can encrypt mails manually, but I would like to access it programmatically. Perhaps I can call like an event or something that is called when this property is set.
我没有任何证书.有没有办法在不使用证书的情况下加密 Outlook 中的邮件?
I do not have any Certificates. Is there even a way to encrypt mails in Outlook without using Certificates?
推荐答案
您需要设置 PR_SECURITY_FLAGS 属性.请参阅 https://blogs.msdn.microsoft.com/dvespa/2009/03/16/how-to-sign-or-encrypt-a-message-programmatically-from-oom/例子.
You will need to set the PR_SECURITY_FLAGS property. See https://blogs.msdn.microsoft.com/dvespa/2009/03/16/how-to-sign-or-encrypt-a-message-programmatically-from-oom/ for an example.
这篇关于通过 VBA 以编程方式加密 Outlook 邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!