FIX: Set the lang/xml:lang html attrs in emails (PR #10218)

In some rare cases emails were incorrectly sent out with lang placeholders in body (e.g. xml:lang="%{html_lang}")

GitHub