X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=74f4e96008221366fbf291aaebe35eabb28d1fb7;hb=e50f5ac2682d655013d18d97f9a2aa30b7ed9485;hp=0fc323fa0c55f283561d0a5637c8f435fd8515de;hpb=39bfea8fa9fd939da9766a79381f68ea4b725c23;p=squirrelmail.git diff --git a/src/read_body.php b/src/read_body.php index 0fc323fa..74f4e960 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -1,8 +1,9 @@ rfc822_header; - $hashed_attachment_dir = getHashedDir($username, $attachment_dir); $rfc822_header = new Rfc822Header(); $content_type = new ContentType('multipart/report'); @@ -184,9 +183,9 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $now = getLongDateString( time() ); set_my_charset(); $body = _("Your message") . "\r\n\r\n" . - "\t" . _("To:") . ' ' . decodeHeader($to,false,false) . "\r\n" . - "\t" . _("Subject:") . ' ' . decodeHeader($header->subject,false,false) . "\r\n" . - "\t" . _("Sent:") . ' ' . $senton . "\r\n" . + "\t" . _("To") . ': ' . decodeHeader($to,false,false) . "\r\n" . + "\t" . _("Subject") . ': ' . decodeHeader($header->subject,false,false) . "\r\n" . + "\t" . _("Sent") . ': ' . $senton . "\r\n" . "\r\n" . sprintf( _("Was displayed on %s"), $now ); @@ -202,6 +201,8 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $special_encoding = '7bit'; } } + } elseif (sq_is8bit($body)) { + $special_encoding = '8bit'; } $part1 = new Message(); $part1->setBody($body); @@ -253,7 +254,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { } else { require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php'); $deliver = new Deliver_SMTP(); - global $smtpServerAddress, $smtpPort, $smtp_auth_mech, $pop_before_smtp; + global $smtpServerAddress, $smtpPort, $pop_before_smtp; $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false; get_smtp_user($user, $pass); $stream = $deliver->initStream($composeMessage,$domain,0, @@ -302,7 +303,7 @@ function ClearAttachments() { if ($info['session'] == -1) { $attached_file = "$hashed_attachment_dir/$info[localfilename]"; if (file_exists($attached_file)) { - unlink($attached_file); + unlink($attached_file); } } else { $rem_attachments[] = $info; @@ -367,11 +368,11 @@ function formatRecipientString($recipients, $item ) { function formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee) { - global $msn_user_support, $default_use_mdn, $default_use_priority, + global $default_use_mdn, $default_use_priority, $show_xmailer_default, $mdn_user_support, $PHP_SELF, $javascript_on, - $squirrelmail_language; + $squirrelmail_language; - $mailbox = $aMailbox['NAME'] ; + $mailbox = $aMailbox['NAME']; $header = $message->rfc822_header; $env = array(); @@ -460,7 +461,7 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed global $base_uri, $draft_folder, $where, $what, $color, $sort, $startMessage, $PHP_SELF, $save_as_draft, $enable_forward_as_attachment, $imapConnection, $lastTargetMailbox, - $data_dir, $username, $delete_prev_next_display, + $username, $delete_prev_next_display, $compose_new_win, $javascript_on; //FIXME cleanup argument list, use $aMailbox where possible @@ -596,7 +597,7 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed // BEGIN MENU ROW - DELETE/REPLY/FORWARD/MOVE/etc. - $menu_row = '