Member-only story

Outlook Add-in — Office.js + Angular + Validate Sender email address

Balram Chavan
4 min readJan 7, 2020

In many organisation, people receives phishing emails with company’s name tweaked/changed a bit so to look original. As a human being its very easy to ignore such small change(s) and people ends up responding to such phishing email. In this story we will see an add-in which validates selected email address against hard coded domain name. If selected email is safe then a notification message will be displayed on top of the email otherwise a warning will be displayed.

For example you are working in an organisation and your official email address is “sherlock-homes@smart-detectives-technologies.com”. Now you can get an email from an address “dracula@smart-detecctive-technologies.com”. On a quick look email address looks good and you will just respond to email.

To avoid such scenarios, I have built an Outlook add-in using Office.js and Angular framework called “validate-sender”. What this add-in does is, it check the sender’s email address and validate against the hardcoded domain name.

Understanding code

You can find complete source code on GitHub. Clone the repository and install the packages using command npm install. Open source code in VS Code or any of your favourite IDE.

In commands.ts` file You can put your organisation’s email address in VALID_DOMAIN_NAME variable.

--

--

Balram Chavan
Balram Chavan

Written by Balram Chavan

Google Developer Expert Angular | Architect | Author | http://www.youtube.com/@angularcloud

No responses yet