diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-11 21:11:42 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-11 21:11:42 +0000 |
| commit | da2e18f380734999ec1d1ba57091850bf296f554 (patch) | |
| tree | c6a2c18e08299c9ed14ef708fd8e25920625ae90 /roundcubemail/program/steps/mail | |
| parent | f5050a3e1f1e3dfabc03e6f02263c7d0d656e76d (diff) | |
Better support for Courier IMAP
git-svn-id: https://svn.roundcube.net/trunk@25 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 7 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 03f508be8..f65e4ff7b 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/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/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 2172accc8..61821261d 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/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); } |
