How to Create an Email Template for Targeted Security Notifications


The Office 365 Targeted Security Notifications template allows a custom HTML email template to be used when sending out email notifications to end users. Using a custom HTML email template will allow branding, specific instructions on how to respond to any suspicious activity and any other supporting information to be included as part of the notification.

The email notification subject can also be customized for further branding purposes.

Email Subject

By default, the subject of the targeted security notifications to end users will be ‘Your Account Security Overview – {DATE}’ (where {DATE} will be replaced with the GMT at the time of email generation). If a string is provided, it will be used as the email subject for the notifications. Additionally, specifying the placeholder string {DATE} will also include the GMT.

Email Template

A default Voleer branded HTML email template will be used if no URL is provided during the configuration of the Office 365 Targeted Security Notification template (Section 4) under the heading of ‘Custom Targeted Email Body Template).

To make use of the custom HTML email template, specify the public URL address.

Customizing a template

When the Office 365 Targeted Security Notification template executes, it will download the HTML email template from the specified URL and replaces 2 placeholders.

The placeholders are

  • {RECIPIENT_NAME} – the name of the end user who is receiving the notification
  • {CONTENT} – the configured security data sections

The most basic HTML email template would look like the following

Where {RECIPIENT_NAME} will be replaced with the end user’s name, and {CONTENT} will be replaced with the security data sections (sign-ins and granted full access permissions).

Additional Styling elements

The {CONTENT} generated by the notification template contains HTML tags that can be referenced in CSS to provide additional styling. Each data section is wrapped in a DIV tag with class ‘container’, and within each ‘container’ is an additional DIV tag with class ‘container_title’ including an id to specify the type of data being shown. The security data is formatted in an unordered list (tags UL and LI).

An example of the HTML section looks like the following

Please note that email clients on various systems and platforms (including mobile) have different levels of compliance to HTML and CSS standards. As such, testing of your customised HTML email template is strongly recommended before using in the Office 365 Targeted Security Notifications template.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.