Today, I will go over the steps on how to automatically encrypt/decrypt emails in Microsoft Outlook and how to add a button for the encryption to your Outlook. It will look something like this…
I created this button so that the employees in my organization can send encrypted emails to outside of the organization easily. It is pretty easy to setup as well.
- Microsoft Outlook
- Office 365 (this is what we use – I have not tested this script out on my other accounts, so I am not sure if it works with all emails or not)
So, there are two parts to this: running the script and creating the button.
- Go to the Developers tab and click on Visual Basic.Copy the code below to the Module1 window and save the file:
If Application.ActiveInspector.CurrentItem.Sensitivity <> olConfidential Then
If MsgBox(“ENCRYPT message ?”, vbOKCancel + vbExclamation, “Message Encryption Confirmation”) = vbOK Then
Application.ActiveInspector.CurrentItem.Sensitivity = olConfidential
Call MsgBox(“This message will be ENCRYPTED for any recipients outside this organization”, vbInformation)
If Application.ActiveInspector.CurrentItem.Sensitivity = olConfidential Then
If MsgBox(“This message is currently set to be Encrypted” & vbCrLf & “Do you want to REMOVE ENCRYPTION ?”, vbOKCancel + vbExclamation, “Message Encryption Confirmation”) = vbOK Then
Application.ActiveInspector.CurrentItem.Sensitivity = olNormal
Call MsgBox(“This message will NOT be ENCRYPTED for any recipients outside this organization”, vbInformation)
- Click New Email.When the New Email window appears, click on File > Options.
- Go to Customize Ribbon.
- Highlight Send then click New Group. Highlight New Group (Custom) and click Rename to rename it -. Then click OK.
- Highlight –(Custom). Go to the left side of the panel and select Macros from the drop-down menu.
- Highlight Project1.setConfidential and click on Add >> to add the macro to –(Custom).
- Select Project1.setConfidential on the right side of the panel and click Rename. Rename the title to Encrypt/Decrypt and choose the Lock icon. Click OK.
If you setup the encryption correctly, the recipient will be able to receive an encrypted message, similar to the image below:
Note: Like I mentioned before, my organization uses Office 365 which already comes with an email encryption feature. Office 365 uses transport rules to control the email encryption. Once we have defined the rule, which in our case is setting the sensitivity level to “Confidential”, Office 365 will inspect all emails before sending it to the intended recipient. If an email is set to Confidential, Office 365 will encrypt the email. The encrypted email will be sent to the recipient with an HTML attachment (see image above). The recipient opens the HTML attachment to connect to the viewing portal. The recipient can either sign in using their Office 365 account or use a one-time passcode that will be sent to their email account.
The image below shows a clear workflow of how the Office 365 Message Encryption feature works: