if ($auto_expunge) {
sqimap_mailbox_expunge($imapConnection, $mailbox, true);
}
+if (!isset($saved_draft)) {
+ $saved_draft = '';
+}
+
+if (!isset($mail_sent)) {
+ $mail_sent = '';
+}
$location = get_location();
+
if (isset($where) && isset($what)) {
header("Location: $location/search.php?where=" . urlencode($where) .
'&what=' . urlencode($what) . '&mailbox=' . urlencode($mailbox));
} else {
- header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" .
- urlencode($mailbox));
+ if (!empty($saved_draft) || !empty($mail_sent)) {
+ header("Location: $location/compose.php?mail_sent=$mail_sent&saved_draft=$saved_draft");
+ }
+ else {
+ header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" .
+ urlencode($mailbox));
+ }
}
sqimap_logout($imapConnection);
+
?>