RepositoryTypeScriptUSUnited States
microsoft

microsoft/MHA

Message Header Analyzer Add-in For Outlook

389stars
67forks
18issues
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: addin

#1 Repository of the month

1
TINIX TRENDING·Topic: outlook

#1 Repository of the month

1
TINIX TRENDING·Topic: office-addin

#1 Repository of the month

MHA

continuous-integration
Deploy Test
CodeQL
Dependency Review
Jest
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

Obtain, Provide Feedback, and Contribute

External Interface Reference

This section documents the external interface of the software, including where it is accessed and the expected inputs and outputs.

End-user interface

Functional input/output

  • Primary input: the currently selected email message in Outlook.
  • Data input read by the app: transport message headers retrieved through the Outlook/EWS mailbox APIs.
  • Primary output: parsed and human-readable header analysis shown in the MHA UI.

Local development/test interface

Interface behavior notes

  • Required Outlook permission level for header retrieval: ReadWriteMailbox.
  • The app consumes Outlook mailbox APIs and does not expose a separate public REST API.

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

  • Testing policy, local test workflow, coverage requirements, and CI details are documented in TESTING.md.

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

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.

Add-in testing (Outlook Web App)

Bundle Analysis

  • Start the dev server: npm run dev-server
  • Generate bundle analysis report: npm run build:analyze
  • This creates a production build with a detailed bundle composition report
  • View the report here: https://localhost:44336/Pages/bundle-analysis/bundle-report.html
  • The report shows:
    • Bundle size visualization with interactive treemap
    • Chunk breakdown and module dependencies
    • Optimization opportunities for large modules
    • Code splitting effectiveness analysis
  • Use this for performance auditing and identifying optimization opportunities

Clean

  • Clean build artifacts: npm clean

Similar Projects

Discover other similar projects and AI models.

RepositoryC#
stevencohn/OneMore

A OneNote add-in with simple, yet powerful and useful features

3.5k
Nov 24, 2026
RepositoryTypeScript
add2cal/add-to-calendar-button

Reliably create beautiful Add to Calendar Buttons, where people can add events to their calendars. Without the hustle and unsupported cases.

1.5k
Nov 28, 2026
RepositoryTypeScript
AnandChowdhary/calendar-link

📅 Calendar link generator for popular services

630
Nov 26, 2026
RepositoryTypeScript
OfficeDev/office-js-snippets

A collection of code snippets built for Script Lab.

280
Nov 24, 2026
RepositoryTypeScript
molotochok/msg-viewer

This tool allows you to read Outlook .msg file in your browser without sending any data to an external server. It is extremely fast, works on any device as long as you have an Internet connection to open the page.

132
May 15, 2025
RepositoryTypeScript
OfficeDev/office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs

123
Sep 20, 2021
RepositoryTypeScript
armhil/easy-code-formatter-styles

Open source styles repository for Easy Code Formatter

88
Mar 25, 2026
RepositoryTypeScript
Vaquill-AI/ms-word-addin

Open Source Legal AI assistant for MS Word as Plugin - contract review, playbooks, drafting, and legal research task-pane add-in.

82
Oct 1, 2026
RepositoryC#
elvirbrk/NoteHighlight2016

Source code syntax highlighting for OneNote 2016 and OneNote for O365 . NoteHighlight 2013 port for OneNote 2016 (32-bit and 64-bit)

3.9k
Jun 22, 2026