In order to get the correct rendering in Outlook, we need to update some of our HTML email templates to include a doctype at the start. However, this causes Alfresco to send them as Plain Text instead of HTML, because the logic in MailActionExecutor to decide if a FTL template rendered into HTML or Plain Text only considers the opening HTML tag, not a HTML Doctype declaration
The logic in the isHTML method needs to consider this too.
(Git blame won't go far enough back to check, but I have a nasty feeling I may be the original author of this method...)
Patch with unit test attached