Hi to all.
I found very impressive the result of mailsystem's mailsystem_html_to_text function when i have to generate plaintext mail part.
Since we have mailsystem module as a dependency, can we just make a

if (empty($plaintext)) {
    // @todo Remove once filter_xss() can handle direct descendant selectors in inline CSS.
    // @see http://drupal.org/node/1116930
    // @see http://drupal.org/node/370903
    // Pull out the message body.
    preg_match('|<body.*?</body>|mis', $body, $matches);
    module_load_include("inc", "mailsystem", "html_to_text");
    $plaintext = mailsystem_html_to_text($matches[0]);
  }

in function mimemail_html_body ?

Comments

eliosh created an issue. See original summary.

TR’s picture

Status: Active » Closed (won't fix)

We're not making major changing in the Drupal 7 version of this module anymore, and that mailsystem function (and functionality) has been removed from the Drupal 8 version of Mailsystem.
See:
#2498261: Convert html_to_text.inc to a class
#3046599: Remove html_to_text.inc