Same name and namespace in other branches
  1. 6.x includes/mail.inc \_drupal_wrap_mail_line()

Wraps words on a single line.

Callback for array_walk() within drupal_wrap_mail().

1 call to _drupal_wrap_mail_line()
drupal_wrap_mail in includes/mail.inc
Performs format=flowed soft wrapping for mail (RFC 3676).
1 string reference to '_drupal_wrap_mail_line'
drupal_wrap_mail in includes/mail.inc
Performs format=flowed soft wrapping for mail (RFC 3676).

File

includes/mail.inc, line 625
API functions for processing and sending e-mail.

Code

function _drupal_wrap_mail_line(&$line, $key, $values) {

  // Use soft-breaks only for purely quoted or unindented text.
  $line = wordwrap($line, 77 - $values['length'], $values['soft'] ? " \n" : "\n");

  // Break really long words at the maximum width allowed.
  $line = wordwrap($line, 996 - $values['length'], $values['soft'] ? " \n" : "\n", TRUE);
}