DefaultMailSystem implements MailSystemInterface::format() incorrectly

Created on 20 February 2012, almost 13 years ago
Updated 23 April 2024, 9 months ago

The current implementation is:

public function format(array $message) {
  // Join the body array into one string.
  $message['body'] = implode("\n\n", $message['body']);
  // Convert any HTML to plain-text.
  $message['body'] = drupal_html_to_text($message['body']);
  // Wrap the mail body for sending.
  $message['body'] = drupal_wrap_mail($message['body']);
  return $message;
}

However, according to the description of drupal_html_to_text(), the call to drupal_wrap_mail() is unnecessary and should be removed since it converts all soft breaks into hard breaks, making format=flowed meaningless.

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
Mail 

Last updated 18 days ago

No maintainer
Created by

🇰🇷South Korea C. Lee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024