added uid support
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 5 Jul 2002 13:53:52 +0000 (13:53 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 5 Jul 2002 13:53:52 +0000 (13:53 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3046 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index e5f634fc5b6e8d9c791c5290467403272b982b52..8caa33be4f7387e650f27900927a6f766103a581 100644 (file)
@@ -162,10 +162,10 @@ function attachFiles ($fp, $session, $rn="\r\n") {
                          * Check if the last line has newline ($rn) in it
                          * and append if it doesn't.
                          */
-                        if ($file && feof($file) && !strstr($tmp, "$rn")){
+                        if ($file && feof($fp) && !strstr($tmp, "$rn")){
                             $tmp .= $rn;
                         }
-                        if ($fp) { 
+                        if ($fp) {
                             fputs($fp, $tmp);
                         }
                         $length += strlen($tmp);
@@ -779,7 +779,7 @@ function sendMessage($t, $c, $b, $subject, $body, $reply_id, $MDN,
     global $useSendmail, $msg_id, $is_reply, $mailbox, $onetimepad,
         $data_dir, $username, $domain, $key, $version, $sent_folder, 
         $imapServerAddress, $imapPort, $default_use_priority, $more_headers, 
-        $request_mdn, $request_dr;
+        $request_mdn, $request_dr, $uid_support;
 
     $more_headers = Array();
     
@@ -797,7 +797,7 @@ function sendMessage($t, $c, $b, $subject, $body, $reply_id, $MDN,
          * The References header should really be the old Referenced header
          * with the message ID appended, and now it is (jmunro)
          */
-       $sid = sqimap_session_id(); 
+       $sid = sqimap_session_id($uid_support); 
        $query = "$sid FETCH $reply_id (BODY.PEEK[HEADER.FIELDS (Message-Id In-Reply-To)])\r\n";
        fputs ($imap_stream, $query);
        $read = sqimap_read_data($imap_stream, $sid, true, $response, $message);