thomascube
2009-05-01 762a699dc7a5d0e3971a4679f714b7fa8d8832cf
Hard-wrap message headers according to RFC

2 files modified
4 ■■■■ changed files
program/include/rcube_mail_mime.php 2 ●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc 2 ●●● patch | view | raw | blame | history
program/include/rcube_mail_mime.php
@@ -180,7 +180,7 @@
        }
      }
      $input[$hdr_name] = $hdr_value;
      $input[$hdr_name] = wordwrap($hdr_value, 990, "\n", true);  // hard limit header length
    }
    return $input;
program/steps/mail/sendmail.inc
@@ -226,7 +226,7 @@
  $headers['Bcc'] = ($headers['Bcc'] ? $headers['Bcc'].', ' : '') . $identity_arr['bcc'];
// add subject
$headers['Subject'] = trim(get_input_value('_subject', RCUBE_INPUT_POST, FALSE, $message_charset));
$headers['Subject'] = trim(get_input_value('_subject', RCUBE_INPUT_POST, TRUE, $message_charset));
if (!empty($identity_arr['organization']))
  $headers['Organization'] = $identity_arr['organization'];