summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc7
-rw-r--r--program/steps/mail/sendmail.inc14
-rw-r--r--program/steps/settings/manage_folders.inc2
3 files changed, 19 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 03f508be8..f65e4ff7b 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -403,7 +403,12 @@ function rcmail_compose_subject($attrib)
// create a reply-subject
else if (isset($REPLY_MESSAGE['subject']))
- $subject = 'Re: '.$REPLY_MESSAGE['subject'];
+ {
+ if (strpos($REPLY_MESSAGE['subject'], 'Re:')===0)
+ $subject = $REPLY_MESSAGE['subject'];
+ else
+ $subject = 'Re: '.$REPLY_MESSAGE['subject'];
+ }
// create a forward-subject
else if (isset($FORWARD_MESSAGE['subject']))
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 2172accc8..61821261d 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -216,10 +216,20 @@ if ($CONFIG['sent_mbox'])
// check if mailbox exists
if (!in_array_nocase($CONFIG['sent_mbox'], $IMAP->list_mailboxes()))
- $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE);
+ $mbox = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE);
+ else
+ $mbox = TRUE;
// append message to sent box
- $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body);
+ if ($mbox)
+ $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body);
+
+ // raise error if saving failed
+ if (!$saved)
+ raise_error(array('code' => 800,
+ 'type' => 'imap',
+ 'file' => __FILE__,
+ 'message' => "Could not save message in $CONFIG[sent_mbox]"), TRUE, FALSE);
}
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index 8d74ab031..b960561f7 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -51,7 +51,7 @@ else if ($_action=='create-folder')
if ($create && $_GET['_remote'])
{
- $commands = sprintf("this.add_folder_row('%s')", rep_specialchars_output($_GET['_name'], 'js'));
+ $commands = sprintf("this.add_folder_row('%s')", rep_specialchars_output($create, 'js'));
rcube_remote_response($commands);
}
else if (!$create && $_GET['_remote'])