From f55207e3ac94a005d5a19ae57505f1cb180a6d68 Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 24 Oct 2002 13:36:55 +0000 Subject: [PATCH] fix for unidentified reply-to header lines. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4003 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compose.php b/src/compose.php index 78c036d3..5950e844 100644 --- a/src/compose.php +++ b/src/compose.php @@ -661,9 +661,11 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $send_to_cc = replyAllString($orig_header); case ('reply'): $send_to = $orig_header->reply_to; - if (is_object($send_to)) { + if (is_array($send_to) && count($send_to)) { $send_to = decodeHeader($send_to->getAddr_s('reply_to')); - } else { + } else if (is_object($send_to)) { /* unnessecarry, just for falesafe purpose */ + $send_to = decodeHeader($send_to->getAddr_s('reply_to')); + } else { $send_to = decodeHeader($orig_header->getAddr_s('from')); } $subject = decodeHeader($orig_header->subject); @@ -1348,7 +1350,7 @@ function deliverMessage($composeMessage, $draft=false) { $length = $imap_deliver->mail($composeMessage); sqimap_append ($imap_stream, $draft_folder, $length); $imap_deliver->mail($composeMessage, $imap_stream); - sqimap_append_done ($imap_stream); + sqimap_append_done ($imap_stream, $draft_folder); sqimap_logout($imap_stream); unset ($imap_deliver); return $length; @@ -1375,7 +1377,7 @@ function deliverMessage($composeMessage, $draft=false) { require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php'); $imap_deliver = new Deliver_IMAP(); $imap_deliver->mail($composeMessage, $imap_stream); - sqimap_append_done ($imap_stream); + sqimap_append_done ($imap_stream, $sent_folder); unset ($imap_deliver); } global $passed_id, $mailbox, $action; -- 2.25.1