[bug 855621] Setup infrastructure for sending HTML emails

This sets up everything to start sending HTML versions of emails. Tests should be added (or existing ones should be tweaked) for each email as they are added.

r?