Drupal Association members fund grants that make connections all over the world.
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):
(after patch, using regular Drupal core mailhandler)