diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-06 18:04:15 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-06 18:04:15 +0000 |
| commit | 66fab353c35e470f6fa723a866e5637bdd6c56c5 (patch) | |
| tree | 486dcd1369cfdb6e063c323adb60197a92c1694f /roundcubemail/program | |
| parent | 2e6b406767327e8a30405ce44971680632d744a2 (diff) | |
Give the user a second chance when sending failes due session error
git-svn-id: https://svn.roundcube.net/trunk@1755 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 9a79317bc..9efb0d7ad 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -21,12 +21,17 @@ */ -if (!isset($_SESSION['compose']['id'])) - { +// remove all scripts and act as called in frame +$OUTPUT->reset(); +$OUTPUT->framed = TRUE; + + +if (!isset($_SESSION['compose']['id'])) { raise_error(array('code' => 500, 'file' => __FILE__, 'message' => "Invalid compose ID"), true, false); - rcmail_overwrite_action('compose'); - return; - } + console("Sendmail error", $_SESSION['compose']); + $OUTPUT->show_message("An internal error occured. Please try again.", 'error'); + $OUTPUT->send('iframe'); +} /****** message sending functions ********/ @@ -117,10 +122,6 @@ if (strlen($_POST['_draft_saveid']) > 3) $message_id = sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host'])); $savedraft = !empty($_POST['_draft']) ? TRUE : FALSE; -// remove all scripts and act as called in frame -$OUTPUT->reset(); -$OUTPUT->framed = TRUE; - /****** check submission and compose message ********/ |
