@ -698,6 +698,7 @@ if ($store_target) {
unlink($mailbody_file);
$mailbody_file = null;
}
// raise error if saving failed
if (!$saved) {
@ -707,10 +708,11 @@ if ($store_target) {
if ($savedraft) {
$OUTPUT->show_message('errorsaving', 'error');
// start the auto-save timer again
$OUTPUT->command('auto_save_start');
$OUTPUT->send('iframe');
if ($olddraftmessageid) {
// delete previous saved draft