I'm trying to use mailmime, htmlmail, and mailsystem, and would like to come out with a readable plain-text version in the mailmime multipart/alternative.

Unfortunately, mailsystem is double-wrapping the plain text. Drupal is already set to do wrapping. In drupal_mail():

  $message['body'] = is_array($message['body']) ? drupal_wrap_mail(implode("\n\n", $message['body'])) : drupal_wrap_mail($message['body']);

This patch removes the wrapping done by mailsystem and leaves the work to Drupal core (or whatever mailhandler needs to be sending the mail)

The result of wrapping twice is quite ugly for plain-text receivers (before patch):

10 AM.png

(after patch, using regular Drupal core mailhandler)

rfay_screenshot 2012-10-16 at 11.22.50 AM.png

Members fund testing for the Drupal project. Drupal Association Learn more