Preserving head and doctype of incoming html emails

[#78157350]