html_email_handler sync with Coldtrick (changes merged)