Skip to content
forked from microsoft/MHA

Message Header Analyzer Add-in For Outlook

License

Notifications You must be signed in to change notification settings

PragyaPriya30/MHA

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MHA

OpenSSF Scorecard
OpenSSF Best Practices

Message Header Analyzer mail app.

This is the source for the Message Header Analyzer. Install the app from the store here: https://appsource.microsoft.com/en-us/product/office/WA104005406

Installation Procedure

Because MHA requires the ReadWriteMailbox permission it can only be installed by the Administrator through the Exchange admin center or by a user as a custom addon. Here are some steps I put together:

  1. In Office365, go to the Exchange Admin Center.
  2. Click on the Organization tab
  3. From there, select the add-ins tab
  4. Click the Plus icon/Add from the Office Store
  5. Click the Plus icon/Add from the Office Store
  6. A new page will load for the store
  7. Search for "Message Header Analyzer"
  8. Choose MHA in the results
  9. Click Add
  10. Confirm by clicking Yes
  11. Back in the Exchange Admin Center, refresh the list of add-ins
  12. You can now edit who the add-in is available for

A Note on Permissions

In order to get the transport message headers I have to use the EWS makeEwsRequestAsync method, which requires the ReadWriteMailbox permission level. See the article Understanding Outlook add-in permissions for more on this. If I could request fewer permissions I would, since I only ever read the one property, but I have no choice in the matter.

When REST is more widely available, and a few REST specific bugs are fixed, I'll be able to switch to REST and request a lower permission level.

Standalone

Here is a standalone Message Header Analyzer running the same backend code as the MHA app: https://mha.azurewebsites.net/pages/mha.html

Unit Tests

https://mha.azurewebsites.net/pages/unittests.html

Mobile

For both IOS and Android click open an email, then press the three dots under the date. There you should see the MHA icon. See outlook-mobile-addins page for more details.

Development & Custom Deployment

Install and prereqs

  1. Ensure node.js (LTS) is installed
  2. Clone the repo to your local drive
  3. Run the following to install packages: npm install

Manual build

  • The commands below for unit/site/add-in testing will also build before starting the server, but you can also build on demand.
  • Manual build: npm run build
  • For continuous build on changes, you can use watch: npm run watch

Unit Testing

  • Start the dev server: npm run dev-server
  • Run unit tests from command line: npm run test
  • Run unit tests locally in browser: https://localhost:44336/Pages/unittests.html
  • Changes made to source should live compile and reload page. Ctrl+R/refresh as needed.

Live site testing

Add-in testing (Command line)

  • Close Outlook
  • Start the dev server: npm start
  • Outlook should start with add-in added as "View Headers Debug Local"
  • Changes made to source should live compile and reload in Outlook. Ctrl+R/refresh as needed.

Add-in testing (VSCode)

  • Follow the steps given here.

Clean

  • Clean build artifacts: npm clean

About

Message Header Analyzer Add-in For Outlook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.9%
  • HTML 6.2%
  • CSS 3.0%
  • JavaScript 2.5%
  • Batchfile 1.1%
  • PowerShell 0.2%
  • Dockerfile 0.1%