$tmp = nl2br(htmlspecialchars($tmp));
displayPageHeader($color, 'None');
include ("../functions/display_messages.php");
- $lines = nl2br(htmlspecialchars($lines));
$msg = "Message not sent!<br>\nReason given: $tmp";
plain_error_message($msg, $color);
return(0);
}
sqimap_logout($imap_stream);
// Delete the files uploaded for attaching (if any).
- ClearAttachments();
+ // only if $length != 0 (if there was no error)
+ if ($length)
+ ClearAttachments();
+
+ return $length;
}
?>
set_my_charset();
do_hook("compose_send");
- if (sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id) == 0) {showInputForm(); exit();}
+ if (! sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id)) {
+ showInputForm();
+ exit();
+ }
+ Header("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
} else {
//$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
displayPageHeader($color, $mailbox);