In htmlmail.mail.inc is public function format(array $message)
Content-Type is hard coded as follow:
$message['headers']['Content-Type'] = 'text/html; charset=utf-8';

There should be an option to set custom value for Content-Type and wrapping Message-Body:
$message['body'] = htmlentities($body);

Comments

tr’s picture

Version: 8.x-2.64 » 8.x-3.x-dev
Status: Active » Closed (won't fix)
Issue tags: -Content type

Well, 8.x-2.x is an unsupported branch that doesn't work in Drupal 8 since it is an incomplete port of the D7 code.

But if I consider this for 8.x-3.x, the answer would be no, we don't want to do this. The whole purpose of Html Mail is ... to send HTML emails. Allowing you to change the content type could only break this. Likewise, html-escaping the email body makes it so it's not HTML anymore. I don't see the point - send your email in plaintext if you want that.

tr’s picture