IT, Microsoft, Outlook

Script to Encrypt/Decrypt Email in Outlook

Hiya!

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…

encrypt

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.

Pre-Requisites:

  • 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.

Script

  1. Go to the Developers tab and click on Visual Basic.Copy the code below to the Module1 window and save the file:

Sub setConfidential()
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)
    End If
    Exit Sub
End If
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)
    End If
    Exit Sub
End If
End Sub

Button

  1. Click New Email.When the New Email window appears, click on File > Options.
  2. Go to Customize Ribbon.
  3. Highlight Send then click New Group. Highlight New Group (Custom) and click Rename to rename it -. Then click OK.
  4. Highlight –(Custom). Go to the left side of the panel and select Macros from the drop-down menu.
  5. Highlight Project1.setConfidential and click on Add >> to add the macro to –(Custom).
  6. 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:

encrypt-email

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:

email

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s