diff options
author | thomascube <thomas@roundcube.net> | 2008-07-31 21:08:17 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-07-31 21:08:17 +0000 |
commit | faf8766fd2a34ad1eaf1545bab659ab459c074ad (patch) | |
tree | 0e71a6139e814749f41331ba87450fe1b5ebfb66 /program/steps/mail/sendmail.inc | |
parent | 62e54249df84f7d8a1d9af2f6d5a978bbba78bb5 (diff) |
Save outgoing mail to selectable folder (#1324581)
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r-- | program/steps/mail/sendmail.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 75000d4aa..090919e35 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -355,27 +355,27 @@ if (!$savedraft) // Determine which folder to save message if ($savedraft) - $store_target = 'drafts_mbox'; + $store_target = $CONFIG['drafts_mbox']; else - $store_target = 'sent_mbox'; + $store_target = isset($_POST['_store_target']) ? get_input_value('_store_target', RCUBE_INPUT_POST) : $CONFIG['sent_mbox']; -if ($CONFIG[$store_target]) +if ($store_target) { // check if mailbox exists - if (!in_array_nocase($CONFIG[$store_target], $IMAP->list_mailboxes())) - $store_folder = $IMAP->create_mailbox($CONFIG[$store_target], TRUE); + if (!in_array_nocase($store_target, $IMAP->list_mailboxes())) + $store_folder = $IMAP->create_mailbox($store_target, TRUE); else $store_folder = TRUE; // append message to sent box if ($store_folder) - $saved = $IMAP->save_message($CONFIG[$store_target], $MAIL_MIME->getMessage()); + $saved = $IMAP->save_message($store_target, $MAIL_MIME->getMessage()); // raise error if saving failed if (!$saved) { raise_error(array('code' => 800, 'type' => 'imap', 'file' => __FILE__, - 'message' => "Could not save message in $CONFIG[$store_target]"), TRUE, FALSE); + 'message' => "Could not save message in $store_target"), TRUE, FALSE); $OUTPUT->show_message('errorsaving', 'error'); $OUTPUT->send('iframe'); |