You are here

function _drupal_wrap_mail_line in Drupal 6

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

Helper function for array_walk in drupal_wrap_mail().

Wraps words on a single line.

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

File

includes/mail.inc, line 424

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");
}