An interesting idea. Please post to Ideas.
You can do this also by sending your emails to a seedlist or box on Litmus or another system to do what you need. As for compiling the library, that sounds like some custom code. Is it possible to leverage the existing old system to work in this way?
Thanks for your reply. The Litmus functionality sounds like a possible solution. I'll look into it.