From 966286ae03f8aaa511f619a9de2e15a2a9a05446 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Fri, 5 May 2000 15:30:48 +0000 Subject: [PATCH] sending messages takes you back to previous mailbox , saves "Answered" flag git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@498 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 3 ++- functions/smtp.php | 11 ++++++++--- src/compose.php | 11 ++++++++--- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/functions/page_header.php b/functions/page_header.php index e53e6968..57ba30bc 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -56,7 +56,8 @@ echo " \n"; echo ""; echo "
"; - echo " " . _("Compose") . "  "; + $urlMailbox = $mailbox; + echo " " . _("Compose") . "  "; echo " " . _("Addresses") . "  "; echo " " . _("Folders") . "  "; echo " " . _("Options") . "  "; diff --git a/functions/smtp.php b/functions/smtp.php index 049b8da2..5fa020de 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -427,17 +427,22 @@ return $err_num; } - function sendMessage($t, $c, $b, $subject, $body) { - global $useSendmail, $msg_id, $is_reply; + function sendMessage($t, $c, $b, $subject, $body, $reply_id) { + global $useSendmail, $msg_id, $is_reply, $mailbox; global $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort; + $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1); + if ($reply_id) { + sqimap_mailbox_select ($imap_stream, $mailbox); + sqimap_messages_flag ($imap_stream, $reply_id, $reply_id, "Answered"); + } + if ($useSendmail==true) { $length = sendSendmail($t, $c, $b, $subject, $body); } else { $length = sendSMTP($t, $c, $b, $subject, $body); } - $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1); if (sqimap_mailbox_exists ($imap_stream, $sent_folder)) { sqimap_append ($imap_stream, $sent_folder, $length); write822Header ($imap_stream, $t, $c, $b, $subject); diff --git a/src/compose.php b/src/compose.php index 8a67bac6..8d67a236 100644 --- a/src/compose.php +++ b/src/compose.php @@ -145,7 +145,7 @@ global $send_to, $send_to_cc, $reply_subj, $forward_subj, $body, $passed_body, $color, $use_signature, $signature, $editor_size, $attachments, $subject, $newmail, $use_javascript_addr_book, - $send_to_bcc; + $send_to_bcc, $reply_id, $mailbox; $subject = decodeHeader($subject); $reply_subj = decodeHeader($reply_subj); @@ -163,6 +163,10 @@ } echo "\n
\n"; + if ($reply_id) { + echo "\n"; + } + echo "\n"; echo "\n"; echo " \n"; echo "
\n"; @@ -314,8 +318,9 @@ if(isset($send)) { if (checkInput(false)) { - sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body); - header ("Location: right_main.php"); + $urlMailbox = urlencode ($mailbox); + sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id); + header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1"); } else { echo "\n"; $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); -- 2.25.1