[bug 855621] Setup infrastructure for sending HTML emails
Cleanup and consistency-ify