You are here

function _mimemail_wrap_mail_line in Mime Mail 5

Helper function for array_walk in mimemail_wrap_mail().

Wraps words on a single line.

1 call to _mimemail_wrap_mail_line()
mimemail_wrap_mail in ./html_to_text.inc
Perform format=flowed soft wrapping for mail (RFC 3676).
1 string reference to '_mimemail_wrap_mail_line'
mimemail_wrap_mail in ./html_to_text.inc
Perform format=flowed soft wrapping for mail (RFC 3676).

File

./html_to_text.inc, line 234

Code

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