Problem with _drupal_wrap_mail_line and attachment files

Created on 1 November 2011, about 13 years ago
Updated 24 April 2024, 9 months ago

I use the Contact attach module to send files with the contact module. In general, it works good, but when sending .docx files or files with long names, the email is not received correctly.

Debugging, when I comment out the line 426 on the include/mail.inc I correctly receive the email.

$line = wordwrap($line, 996 - $values['length'], $values['soft'] ? " \n" : "\n");

The function containing that line is _drupal_wrap_mail_line().

/**
 * Wraps words on a single line.
 *
 * Callback for array_walk() within drupal_wrap_mail().
 */
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);
}
🐛 Bug report
Status

Needs review

Version

7.0 ⚰️

Component
Mail 

Last updated 19 days ago

No maintainer
Created by

🇨🇷Costa Rica maxmendez

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

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