summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-13 17:00:35 +0000
committeralecpl <alec@alec.pl>2008-08-13 17:00:35 +0000
commit9a5762a4de13a23a45ac9b85ff475aaf877cf906 (patch)
tree455bdb1323e1264c4a7936369570e803665b2a8c /program/steps/mail/sendmail.inc
parent7c2d30b2e106a23fe2ab295f7dc2e628e4d828bb (diff)
#1485242: better handling of situation when message was sent successfully but cannot be saved
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 090919e35..9888c5a97 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -377,8 +377,10 @@ if ($store_target)
raise_error(array('code' => 800, 'type' => 'imap', 'file' => __FILE__,
'message' => "Could not save message in $store_target"), TRUE, FALSE);
- $OUTPUT->show_message('errorsaving', 'error');
- $OUTPUT->send('iframe');
+ if ($savedraft) {
+ $OUTPUT->show_message('errorsaving', 'error');
+ $OUTPUT->send('iframe');
+ }
}
if ($olddraftmessageid)
@@ -434,7 +436,11 @@ else
}
rcmail_compose_cleanup();
- $OUTPUT->command('sent_successfully', rcube_label('messagesent'));
+
+ if ($store_folder && !$saved)
+ $OUTPUT->command('sent_successfully', 'error', rcube_label('errorsavingsent'));
+ else
+ $OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'));
$OUTPUT->send('iframe');
}