59177427 |
1 | <?php |
ef870322 |
2 | /** |
3 | ** delete_message.php |
4 | ** |
5 | ** Copyright (c) 1999-2000 The SquirrelMail development team |
6 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
7 | ** |
8 | ** Deletes a meesage from the IMAP server |
245a6892 |
9 | ** |
10 | ** $Id$ |
ef870322 |
11 | **/ |
12 | |
ff8a98e7 |
13 | require_once('../src/validate.php'); |
14 | require_once('../functions/display_messages.php'); |
15 | require_once('../functions/imap.php'); |
d3cdb279 |
16 | |
e1469126 |
17 | $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); |
d4467150 |
18 | |
fe84f328 |
19 | sqimap_mailbox_select($imapConnection, $mailbox); |
20 | |
a3cb3d5f |
21 | sqimap_messages_delete($imapConnection, $message, $message, $mailbox); |
acaa9842 |
22 | if ($auto_expunge) |
8cf653ad |
23 | sqimap_mailbox_expunge($imapConnection, $mailbox, true); |
acaa9842 |
24 | |
1195c340 |
25 | $location = get_location(); |
9d7140c9 |
26 | if (isset($where) && isset($what)) |
1809bad8 |
27 | header ("Location: $location/search.php?where=".urlencode($where)."&what=".urlencode($what)."&mailbox=".urlencode($mailbox)); |
28 | else |
29 | header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox)); |
a48fbf9b |
30 | |
31 | sqimap_logout($imapConnection); |
ff8a98e7 |
32 | ?> |