BoilerplateMailPlugin
A boilerplate mail plugin for Apple's Mail.app using the undocumented bundle APIs. Works with 10.12.4 (Sierra), untested elsewhere.
Installing the Bundle
Simply build from xCode (⌘+B) and the bundle will be installed to ~/Library/Mail/Bundles/. See the script in Build Phases for more information.
After building, open or restart Mail.app. You should get an alert letting you know it's working.
Thanks
Jeevanandam M.'s ReplyWithHeader as well as his older writeup was helpful to get this working on Sierra.