special chars should be undone only after encoding
[squirrelmail.git] / src / compose.php
index a07c3872aed98acbfb04a3223f6c4501305d57d5..b344b9314081e27d50305c38dc713608bfb47925 100644 (file)
@@ -118,7 +118,6 @@ function replyAllString($header) {
     /**
      * 1) Remove the addresses we'll be sending the message 'to'
      */
-    $url_replytoall_avoid_addrs = '';
     if (isset($header->replyto)) {
         $excl_ar = $header->getAddr_a('replyto');
     }
@@ -574,7 +573,7 @@ function getforwardSubject($subject)
 /* This function is used when not sending or adding attachments */
 function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
     global $editor_size, $default_use_priority, $body, $idents,
-        $use_signature, $composesession, $data_dir, $username,
+        $use_signature, $data_dir, $username,
         $username, $key, $imapServerAddress, $imapPort, $compose_messages,
         $composeMessage, $body_quote;
     global $languages, $squirrelmail_language, $default_charset;
@@ -623,7 +622,6 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
             $orig_header = $message->rfc822_header;
         }
 
-        $encoding = $message->header->encoding;
         $type0 = $message->type0;
         $type1 = $message->type1;
         foreach ($entities as $ent) {
@@ -824,7 +822,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
 } /* function newMail() */
 
 function getAttachments($message, &$composeMessage, $passed_id, $entities, $imapConnection) {
-    global $attachment_dir, $username, $data_dir, $squirrelmail_language;
+    global $attachment_dir, $username, $data_dir, $squirrelmail_language, $languages;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!count($message->entities) ||
             ($message->type0 == 'message' && $message->type1 == 'rfc822')) {
@@ -881,7 +879,7 @@ function getAttachments($message, &$composeMessage, $passed_id, $entities, $imap
 
 function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
         $passed_ent_id='', $imapConnection) {
-    global $attachments, $attachment_dir, $username, $data_dir;
+    global $attachment_dir, $username, $data_dir;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!$passed_ent_id) {
         $body_a = sqimap_run_command($imapConnection,
@@ -913,14 +911,13 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
 }
 
 function showInputForm ($session, $values=false) {
-    global $send_to, $send_to_cc, $body, $startMessage,
-        $passed_body, $color, $use_signature, $signature, $prefix_sig,
-        $editor_size, $editor_height, $attachments, $subject, $newmail,
+    global $send_to, $send_to_cc, $body, $startMessage, $action,
+        $color, $use_signature, $signature, $prefix_sig,
+        $editor_size, $editor_height, $subject, $newmail,
         $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
         $from_htmladdr_search, $location_of_buttons, $attachment_dir,
-        $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
-        $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
-        $saved_draft, $mail_sent, $sig_first, $edit_as_new, $action,
+        $username, $data_dir, $identity, $idents, $delete_draft,
+        $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
         $username, $compose_messages, $composesession, $default_charset;
 
     $composeMessage = $compose_messages[$session];
@@ -1463,7 +1460,7 @@ function deliverMessage($composeMessage, $draft=false) {
     if (!$useSendmail && !$draft) {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
         $deliver = new Deliver_SMTP();
-        global $smtpServerAddress, $smtpPort, $pop_before_smtp, $smtp_auth_mech;
+        global $smtpServerAddress, $smtpPort, $pop_before_smtp;
 
         $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
         get_smtp_user($user, $pass);